gravatar for Ash

2 hours ago by

Hi,

I am trying to use parallel and bwa men to align fastqs in batch but it kept giving me the same error [E::bwa_set_rg] no ID within the read group line . I have tried different combination e.g. ' ' instead of " " or no quotes but none of them worked.

My fastq files names are:

153_D1_S9_R1_001.1607214816484_Cut_0.fastq.gz 
153_D1_S9_R3_001.1607214816484_Cut_0.fastq.gz 
153_ND1_S11_R1_001.1607216304845_Cut_0.fastq.gz 
153_ND1_S11_R3_001.1607216304845_Cut_0.fastq.gz

I have two text files TrimmedMeta.txt and TrimIDs.txt that contain the sample names and ID respectively as below:

TrimmedMeta.txt:

153_D1_S9
153_ND1_S11

TrimIDs.txt

1607214816484 
1607216304845

Code in bash script bwa_align.sh:

outdrive=/SAMs/
ref=/ref/GRCm39/GCF_000001635.27_GRCm39_genomic.fna
TAG="@RGtID:{1}tSM:{1}tLB:{1}"

parallel --link -a TrimmedMeta.txt -a TrimIDs.txt bwa mem -R ${TAG} ${ref} {1}_R1_001.{2}_Cut_0.fastq.gz {1}_R3_001.{2}_Cut_0.fastq.gz '>'${outdrive}/{1}_output.sam

Did a --dry-run gave me what I expected:

bwa mem -R @RGtID:153_D1_S9tSM:153_D1_S9tLB:153_D1_S9 ref/GRCm39/GCF_000001635.27_GRCm39_genomic.fna 153_D1_S9_R1_001.1607214816484_Cut_0.fastq.gz 153_D1_S9_R3_001.1607214816484_Cut_0.fastq.gz > /SAMs/153_D1_S9_output.sam
bwa mem -R @RGtID:153_ND1_S11tSM:153_ND1_S11tLB:153_ND1_S11 ref/GRCm39/GCF_000001635.27_GRCm39_genomic.fna 153_ND1_S11_R1_001.1607216304845_Cut_0.fastq.gz 153_ND1_S11_R3_001.1607216304845_Cut_0.fastq.gz >/SAMs/153_ND1_S11_output.sam

However, when I submit the script gave me the error [E::bwa_set_rg] no ID within the read group line

What is the problem? Thanks

link

written
2 hours ago
by

Ash0



Source link