Please open a new question instead of asking on another question.
Hi all,
I have assembled a transcriptome using Ray. How can I have the numbers of reads by contig ?
I took the reads used to generate the assembly and aligned them to the assembled contigs using BWA to get the unmapped reads, which are the non-assembled reads (singletons). So I have a SAM format output. Maybe can I use samtools to get the reads number by contigs ?
Thank you for your help.
2 answers
If you sort and index the BAM file, then you can just use samtools idxstats. Alternatively, samtools view foo.bam | cut -f 3 | sort | uniq -c will work on unindexed and unsorted files. For a SAM file, that last command could be simplified to grep -v "^@" foo.sam | cut -f 3 | sort | uniq -c.
How can i get which reads were used in each contig in Ray afg file.
I tried to extract read information from the .afg file but it gives numbers instead of Read Ids, what this numbers represent in ray afg file?
Thank you for your help.
Log in to answer this question.
Ok,
And it's not possible to have the number of reads by contigs directly with Ray ?
No clue, never used it. The grep ... command that I gave will be quick enough.