Artificial intelligent assistant

bash script to find the results from multiple input files which are using 'samtools' to a new output csv file I have query related to Bioinformatics. I have multiple bam files, from each bam file i should find out number of mapped reads from each bam file with id's, for doing it i have the command $ samtools view -c -f 1 -F 12 HG00173.chrom11.ILLUMINA.bwa.FIN.low_coverage.20111114.bam for this i am getting output in some numbers as 1222456. My requirement is, I should get the output for all the input bam files in a csv file with 2 columns with naming column 1) Bam-id , column 2) No_of_mapped_reads.

Maybe something like this:


parallel --tag samtools view -c -f 1 -F 12 ::: *.bam


If this is not what you want, please update your question with sample input and sample output.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 876e4a618f067477d869fd3beb39883f