Question: Nucleotide statistics for fasta sequences
0
gravatar for l.souza
2.1 years 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.5k views
ADD COMMENTlink modified 2.1 years ago by genomax71k • written 2.1 years ago by l.souza70

I edited the title to be consistent with the question.

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

Thank you, Pierre Lindenbaum!

ADD REPLYlink written 2.1 years ago by l.souza70
4
gravatar for cpad0112
2.1 years 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 2.1 years ago • written 2.1 years 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: 780 users visited in the last hour