![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Python counting bases fasta file | illinu | Bioinformatics | 9 | 08-22-2013 08:17 AM |
counting tags in bam file | james4545 | Bioinformatics | 2 | 01-10-2013 08:03 AM |
VarScan shift in counting of bases! | AlbertZANG | Bioinformatics | 0 | 06-18-2012 10:29 AM |
Counting coverage bases | batsal | Bioinformatics | 0 | 02-17-2012 10:46 AM |
Counting mapped nucleotides in a bam file | moriah | Bioinformatics | 7 | 08-22-2011 01:30 AM |
![]() |
|
Thread Tools |
![]() |
#1 |
Member
Location: MI Join Date: Jun 2013
Posts: 91
|
![]()
Hello,
I have a fasta file like below. >NODE_1476_length_303_cov_5.280528 TTAAGTGGGATTTCGTTTAGTGAGGTAGGTACTTTTACTTGGATTTCCATAATTGTATAAG TCTTTTAGTCGTTTTTGTATTCCTTAGCCAATACATAAGAGTAGGCTTGAGCTAACATTTGA...... >NODE_2306_length_339_cov_2.926254 . . . I want to get total base-pair count from this file. I tried fastx toolkit but it did not work as my fasta format is not what fastx wants (guess fastx wants one line of sequences while mine has two lines of sequences). Could somebody suggest any tool or command for it? Thanks. |
![]() |
![]() |
![]() |
#2 |
Junior Member
Location: Cambridge Join Date: Jul 2013
Posts: 5
|
![]()
Here's a quick unix hack:
grep -v ">" file.fasta | wc | awk '{print $3-$1}' |
![]() |
![]() |
![]() |
#3 |
Member
Location: MI Join Date: Jun 2013
Posts: 91
|
![]()
Thanks, it works very well.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
Location: USA Join Date: Nov 2015
Posts: 3
|
![]()
The number of contigs
I am given a fasta file like this file that you can download it. This file is de novo assembled genome. I have two very simple questions: 1- How many contigs are present in this file? (my guess: it is equal to the number of rows in the file?!) 2- what is the total genomic length of the assembly? (my guess: it is 'len=245876' which has been written in the first line) I am new in DNA sequence analysis stuff, thanks for your kind help. |
![]() |
![]() |
![]() |
#5 | ||
Senior Member
Location: East Coast USA Join Date: Feb 2008
Posts: 7,091
|
![]() Quote:
If you do Code:
grep -c "^>" your_file Quote:
PS: I am not going to download the file from dropbox to test. |
||
![]() |
![]() |
![]() |
#6 | |
Junior Member
Location: USA Join Date: Nov 2015
Posts: 3
|
![]() Quote:
Thanks. I am not convinced because my file is not like general fasta file. It has ONLY one line with '>'. The person has asked me about the number of contigs in this file and I am sure that it is greater than 1. I wish you had downloaded the file and then answered my question. |
|
![]() |
![]() |
![]() |
#7 | |
Senior Member
Location: East Coast USA Join Date: Feb 2008
Posts: 7,091
|
![]() Quote:
a> Your file is either incomplete or b> the sequence got assembled as a single contig note: You appear to have removed the file from dropbox. Last edited by GenoMax; 09-23-2016 at 06:23 AM. |
|
![]() |
![]() |
![]() |
Thread Tools | |
|
|