Question: Nucleotide statistics for fasta sequences
0
gravatar for l.souza
19 months ago by
l.souza70
Brasilia, Brazil
l.souza70 wrote:

I have a FASTA file with 200 sequences, and I would like to know the average of nucleotides. How can I get it?

sequences • 1.2k views
ADD COMMENTlink modified 19 months ago by genomax63k • written 19 months ago by l.souza70

I edited the title to be consistent with the question.

ADD REPLYlink modified 19 months ago • written 19 months ago by genomax63k
1
gravatar for Pierre Lindenbaum
19 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum118k wrote:
awk '/^>/ {N++;next;} {B+=length($0);} END {printf("%f\n",B/N);}' input.fasta
ADD COMMENTlink written 19 months ago by Pierre Lindenbaum118k

Thank you, Pierre Lindenbaum!

ADD REPLYlink written 19 months ago by l.souza70
1
gravatar for cpad0112
19 months ago by
cpad011211k
India
cpad011211k wrote:
seqkit stats input.fasta

Look at avg.len field and link to seqkit: http://bioinf.shenwei.me/seqkit/download/

ADD COMMENTlink modified 19 months ago • written 19 months ago by cpad011211k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1251 users visited in the last hour