SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   bash loop to count multiple words from multiple corresponding files (http://seqanswers.com/forums/showthread.php?t=89244)

chayan 05-09-2019 04:54 PM

bash loop to count multiple words from multiple corresponding files
 
I have generated multiple read mapping files (.sam) generated with bowtie2 "--no-unal" parameter. As the number of files are huge (7 reference genomes mapped against >6000 reads) i want a loop to count the % (or total number) mapped reads for each file.

HTSeq could be an option but don't know how to loop it for multiple files.
Any help would be much appreciated.

GenoMax 05-10-2019 03:24 AM

You should consider using featureCounts. You may not need a loop. You can feed all SAM files to featureCounts and generate a read count matrix directly.

Code:

featureCounts <options> file1.sam file2.sam file3.sam etc.


All times are GMT -8. The time now is 04:35 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.