Entering edit mode
2.3 years ago
Nemo
•
0
Hi, I am running the following command on my bam file coming from rna reads:
java -jar ./picard.jar MarkDuplicates I=./bamOutput/D2.bam O=./markedDuplicatedBams/D2.bam M=./markedDuplicatedBams/D2_metrics.txt
It throws the below exception:
Exception in thread "main" htsjdk.samtools.SAMFormatException: Error parsing SAM header. Problem parsing @PG key:value pair. Line:
@PG ID:samtools PN:samtools PP:hisat2 VN: CL:./samtools sort -o ./bamOutput/D2.bam ./Temp/D2.sam; File /mnt/d/./bamOutput/D2.bam; Line number 5
When I run the samtools view -H command I got the below output:
@HD VN:1.0 SO:coordinate
@SQ SN:NC_045512.2 LN:29903
@RG ID:ID:D2 SM:D2 PL:ILLUMINA PM:HISEQ
@PG ID:hisat2 PN:hisat2 VN:2.2.1 CL:"/mnt/e/hisat2-align-s --wrapper basic-0 --rg-id ID:D2 --rg SM:D2 --rg PL:ILLUMINA --rg PM:HISEQ -x ./reference.fasta -S D2.sam --read-lengths 60 -1 /tmp/9236.inpipe1 -2 /tmp/9236.inpipe2"
@PG ID:samtools PN:samtools PP:hisat2 VN: CL:./samtools sort -o ./bamOutput/D2.bam ./Temp/D2.sam
@PG ID:samtools.1 PN:samtools PP:samtools VN:1.10 CL:samtools view -H ./bamOutput/D2.bam
I think the problem is with VN: flag in @PG tag. How I should resolve this?