Hello, I aligned my reads to reference genome hg19 using BWA. I had to align to the full genome version because of errors with the hg19 canonical version. Now I want to filter out from my BAM all the reads aligned to non canonical chromosomes, unplaced contigs, and mitochondrial chromosome.
I wish to use "Filter SAM or BAM bam" tool, but I'm having problem specifying the multiple chromosomes to be selected, using the option "Select regions (only used when the input is in BAM format)"
The instructions for the option are given as follow:
If regions are specified, only alignments overlapping the specified regions will be output. An alignment may be given multiple times if it is overlapping several regions. A region can be presented, for example, in the following format:
chr2 (the whole chr2) chr2:1000000 (region starting from 1,000,000bp) chr2:1,000,000-2,000,000 (region between 1,000,000 and 2,000,000bp including the end points).
Note: The coordinate is 1-based.
Multiple regions may be specified, separated by a space character:
chr2:1000000-2000000 chr2:1,000,000-2,000,000 chrX
if I fill the field with:
chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20 chr21 chr22 chrX chrY
I get a small 1.8k file with just a header and the message:
[main_samview] region "chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20 chr21 chr22 chrX chrY" specifies an unknown reference name. Continue anyway.
I googled it a little and tried to fill the option with:
"chr1" "chr2" "chr3" "chr4" "chr5" "chr6" "chr7" "chr8" "chr9" "chr10" "chr11" "chr12" "chr13" "chr14" "chr15" "chr16" "chr17" "chr18" "chr19" "chr20" "chr21" "chr22" "chrX" "chrY"
chr1,chr2,chr3,chr4,chr5,chr6,chr7,chr8,chr9,chr10,chr11,chr12,chr13,chr14,chr15,chr16,chr17,chr18,chr19,chr20,chr21,chr22,chrX,chrY
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 X Y
chr1: chr2: chr3: chr4: chr5: chr6: chr7: chr8: chr9: chr10: chr11: chr12: chr13: chr14: chr15: chr16: chr17: chr18: chr19: chr20: chr21: chr22: chrX: chrY:
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: X: Y:
@_@
Is there any way I can work around this?