The code for deletion is samtools view -h unknown_circle.sam | sed -e '/HD/d' > test_circle.samThis command line error, the modified one is at the bottom.
Sorry, I am a rookie, I just understand what you mean, the sed delete command mentioned above is fatal for quality containing HD, I will fix that sed command
what is the output of
? and please, don't post an image when you can copy+paste the text.
Thanks for the tip. I'll try your suggestion
I tried your suggestion samtools view -H qname_unknown_circle.bam and the output result is like this:
yu@root:~$ samtools view -H qname_unknown_circle.bam
@HD VN:1.5 SO:queryname
@SQ SN:chr1 LN:248956422
@SQ SN:chr10 LN:133797422
@SQ SN:chr11 LN:135086622
………(Many lines like this ‘@SQ SN:chrxx LN:xxxx' are omitted)
@SQ SN:chrY_KI270740v1_random LN:37240
@HD VN:1.5 SO:unsorted GO:query
@PG ID:bwa PN:bwa VN:0.7.17-r1198-dirty CL:bwa/bwa mem -q hg38.fa unknown_circle_reads_1.fastq unknown_circle_reads_2.fastq
Wow, I tried to delete the "HD" line from the original Sam file and continue with the circle-map pipeline, and the error disappeared
The code for deletion is samtools view -h unknown_circle.sam | sed -e '/HD/d' > test_circle.samThis command line error, the modified one is at the bottom.what if the name of a read, the quality contains HD ?
I run the following command described in the tutorial and get a sam file that has an HD.
And then I used the the following command to get a bam file with two HD
If a bam file has two HD lines and then runs the following command will produce the error above.
So I deleted the HD line from the original sam file, and it worked.
Thanks again for your help !
Reference: iprada/Circle-Map
Sorry, I am a rookie, I just understand what you mean, the sed delete command mentioned above is fatal for quality containing HD, I will fix that sed command