BWA alignment/Samtools; Fail to read the header
0
0
Entering edit mode
5 weeks ago
Qboy • 0

Hello,

I have an issue with my alignment.

This is an error in my log file: fail to read the header from "-".

Here is my script:

bwa mem -t 8 -R "@RG\tID:$2\tSM:$3" ~/scratch/pt6/pt6.fa  ${1}_1.fastq.gz  ${1}_2.fastq.gz 2>log.bwa_new.$1 |samtools view -S -h -b - >$1.unsorted1.bam 2>>log.bwa_new.$1

Samtools version: 1.10; Bwa version: 0.7.17-r1188

I would very glad if you could help me!

Thank you!

bwa samtools • 357 views
ADD COMMENT
0
Entering edit mode

what is the output of

bwa mem -t 8 -R "@RG\tID:$2\tSM:$3" ~/scratch/pt6/pt6.fa  ${1}_1.fastq.gz  ${1}_2.fastq.gz 2>log.bwa_new.$1 | head

and

echo bwa mem -t 8 -R "@RG\tID:$2\tSM:$3" ~/scratch/pt6/pt6.fa  ${1}_1.fastq.gz  ${1}_2.fastq.gz  log.bwa_new.$1
ADD REPLY
0
Entering edit mode

Dear Pierre,

Here is the answer to your questions (Iguess it works):

altai5@SQ       SN:NC_036879.1  LN:224244399
@SQ     SN:NC_036880.1  LN:108022953
@SQ     SN:NC_036881.1  LN:128755405
@SQ     SN:NC_036882.1  LN:196562556
@SQ     SN:NC_036883.1  LN:189151597
@SQ     SN:NC_036884.1  LN:159319378
@SQ     SN:NW_019932883.1       LN:4118956
@SQ     SN:NW_019932884.1       LN:7484060
@SQ     SN:NW_019932885.1       LN:5402389
@SQ     SN:NC_036885.1  LN:168369391


bwa mem -t 8 -R @RG\tID:HN\tSM:AL5 /home/qboy/scratch/pt6/pt6.fa altai5_1.fastq.gz altai5_2.fastq.gz log.bwa_new.altai5
ADD REPLY
0
Entering edit mode

what i sthat altai5 in front of '@SQ' ?

ADD REPLY
0
Entering edit mode

It is the name of the fastq.gz file. It is not part of the file. My apologies. it just pops up when I run the bash script in prompt.

This is my command to run the script:

for f in `ls *i5_1.fastq.gz |cut -d"_" -f1`; do echo -ne "$f"; bash script_name $f HN AL5; done

ADD REPLY
0
Entering edit mode

I changed " to ' and it worked -_-

Thank you so much!

ADD REPLY

Login before adding your answer.

Traffic: 1248 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6