Hello SEQanswers,
My ultimate goal is to pipe multiple different regions of a bam file to different commands in a single command line argument.
Basically, I am trying to generate some metrics from a BAM file that will be flagged for optical duplicates and then (without storing to disc) I want to pipe each chromosome to a program.
ex.
java -jar picard/MarkDuplicates.jar I=test.bam O=/dev/stdout | tee >(samtools view 'chr1' -| ./generate_metrics) >(samtools view 'chr2' -| ./generate_metrics) ...
any advice if my current implementation isn't the best?
The issue right now is attempting to pull a segment from the bamfile after an initial pipe.
Thanks,
Marco
My ultimate goal is to pipe multiple different regions of a bam file to different commands in a single command line argument.
Basically, I am trying to generate some metrics from a BAM file that will be flagged for optical duplicates and then (without storing to disc) I want to pipe each chromosome to a program.
ex.
java -jar picard/MarkDuplicates.jar I=test.bam O=/dev/stdout | tee >(samtools view 'chr1' -| ./generate_metrics) >(samtools view 'chr2' -| ./generate_metrics) ...
any advice if my current implementation isn't the best?
The issue right now is attempting to pull a segment from the bamfile after an initial pipe.
Thanks,
Marco
Comment