Question: Using parallel with Mem
0
gravatar for always_learning
5.4 years ago by
Doha, Qatar
always_learning980 wrote:

Hi All. 

We are trying to us MEM with GNU parallel with paired fastQ files, but its saying that can't accept more then one file. What could be the possible reasons? What if we concatante both file as single one and then use that with mem?  Does Mem command support multi threading too ?

 

Thanks

Syed

bwa parallel mem • 3.3k views
ADD COMMENTlink modified 18 months ago by Korsocius130 • written 5.4 years ago by always_learning980

show us the cmd-line please.

ADD REPLYlink written 5.4 years ago by Pierre Lindenbaum122k

this exact commant we are using:

${bwa} mem -t 8 -R \\"@RG\\tID:${ursId}_pairend\\tSM:${sampleName}\\tLB:${libraryId}\\tPL:${platform}\\" ${refGenomeFastaFile} \${seqReadsDir}/${ursId}_pairend1.fastq.gz ${seqReadsDir}/${ursId}_pairend2.fastq.gz

ADD REPLYlink modified 5.4 years ago by Michael Dondrup46k • written 5.4 years ago by always_learning980

but how do you invoke parallel ?

ADD REPLYlink written 5.4 years ago by Pierre Lindenbaum122k

Sorry as I didn't able to post complete command. Here it goes as we are trying to convert SAM files to BAM files at same time only

${bwa} mem -t 8 -R "@RG\\tID:${ursId}_pairend\\tSM:${sampleName}\\tLB:${libraryId}\\tPL:${platform}" ${refGenomeFastaFile} \
${seqReadsDir}/${ursId}_pairend1.fastq.gz ${seqReadsDir}/${ursId}_pairend2.fastq.gz | ${samtools} view -bhS - > ${bamDir}/${ursId}.bam" > \
${seqReadsDir}/${ursId}_pairend.txt; parallel -a ${seqReadsDir}/${ursId}_pairend.txt&#39
ADD REPLYlink modified 6 months ago by Kevin Blighe48k • written 5.4 years ago by always_learning980
4
gravatar for Matt Shirley
5.4 years ago by
Matt Shirley9.1k
Cambridge, MA
Matt Shirley9.1k wrote:

This command is telling bwa mem to use 8 threads (`-t`) so you will have some level of parallelism. Your command above does not invoke GNU parallel, and to do so you would use something like:

parallel bwa mem -t 8 -R "@RG\t@ID:blahblahblah" reference.fasta {1} {2} > {1.}.sam ::: *R1.fastq.gz ::: *R2.fastq.gz

See here: https://www.gnu.org/software/parallel/man.html#example__use_multiple_inputs_in_one_command and here: Gnu Parallel - Parallelize Serial Command Line Programs Without Changing Them

ADD COMMENTlink modified 6 months ago by Kevin Blighe48k • written 5.4 years ago by Matt Shirley9.1k

Hi Matt,

I am using gnu parallel as explained by you for cufflinks.Here is my post.

Cufflinks output with filename prefix

I want to add the prefix to my cufflink output files using filenames from bam samples.

ADD REPLYlink written 4.8 years ago by Ron970
0
gravatar for Korsocius
18 months ago by
Korsocius130
Korsocius130 wrote:

There is snytax for parallel with bwa mem, but I can't load ID and SM from INPUT. Do you know, where could be a problem?

ls *R1_001.fastq | parallel 'bwa mem -k 19 -A 1 -B 4 -O 6 -L 5 -R '@RG\tID:'{.}'\tSM:'{.}'\tLB:'Trusight_custom_amplicon_CARR'\tPL:'ILLUMINA'\tPI:150' $REFERENCE {} {= s/_R1_001/_R2_001/ =} > {= s/_R1_001.fastq/.sam/ =}'
ADD COMMENTlink written 18 months ago by Korsocius130
1

ask this as a new question please.

ADD REPLYlink written 18 months ago by Pierre Lindenbaum122k

Paralle bwa mem - problem with -R argument for ID and SM

ADD REPLYlink written 18 months ago by Korsocius130
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1024 users visited in the last hour