- or download this
# Choose any Range of FASTA records
# Called as perl script_name.pl --start start_line --end end_line file
+_name
...
print;
}
}
- or download this
# Choose first N FASTA records
perl -ne 'BEGIN {$/=">";$o=0}{chomp;$o<N?(/^$/?next:print">$_"):last;$
+o++}' EXAMPLE.fa
- or download this
# Choose the Nth FASTA record
perl -0x3E -e 'chomp(@lines = <>);print $lines[N]' EXAMPLE.fa
- or download this
# Choose any Range of FASTA records
perl -0x3E -e 'chomp(@l=<>);for(STrange..ENDrange){print "record $_ is
+ >$l[$_]\n"}' EXAMPLE.fa
perl -0x3E -e 'chomp(@l=<>);print @l[STrange..ENDrange]' EXAMPLE.fa
- or download this
# show the number of FASTA records in a given FASTA file
perl -0x3E -e '@l=grep/\s/,<>;print "$ARGV contains ".scalar(@l)." rec
+ords\n"' EXAMPLE.fa