Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • BBduk in process substitution or with named pipes?

    hello (brian),

    would it be possible to use bbduk as process substituion for mapping, like this.

    Code:
    mapper read1 <(bbduk.sh in1=R1.fastq.gz in2=R2.fastq.gz out1=stdout.fq out2=NULL ref=ref.fa.gz ktrim=r hdist=1) read2 <(bbduk.sh in1=R1.fastq.gz in2=R2.fastq.gz out1=NULL out2=stdout.fq ref=ref.fa.gz ktrim=r hdist=1)
    i do not want keep the trimmed fastq-files, but have to ensure pairdness. how can i repress the output of the each other read?

    or would it even work somehow with named pipes...
    Code:
    mkfifo pipe1.fq
    mkfifo pipe2.fq
    
    bbduk.sh in1=R1.fq.gz in2=R2.fq.gz out1=pipe1.fq out2=pipe2.fq ref=ref.fa.gz ktrim=r hdist=1
    
    mapper read1 <pipe1.fq read2 <pipe2.fq
    thank you,

    dietmar

  • #2
    to answer my own question: it works...

    it works as follows:

    mkfifo pipe1.fq
    mkfifo pipe2.fq

    bbduk.sh overwrite=true in1=R1_001.fastq.gz in2=R2_001.fastq.gz out1=pipe1.fq out2=pipe2.fq ref=truseq_rna.fa.gz ktrim=r hdist=1 &

    ( /home/ws/SW_install/bowtie/bowtie-1.1.1/bowtie -q -v 3 -3 0 -p 21 -a -m 100 --sam gencode19 -1 pipe1.fq -2 pipe2.fq | samtools view -Sb - > SID2158.bam ) 2> SID2158.log

    rm -f pipe1.fq
    rm -f pipe2.fq
    dietmar

    Comment


    • #3
      I'm glad you were able to answer that yourself, as I never use named pipes

      Comment


      • #4
        Doesn't bash process substitution use named pipes? It ends up that you're using them either way then, it's only a difference of 1 vs. 2 pipes.

        Comment


        • #5
          probably,

          but in the first case, bash uses (probably) named pipes internally, in the other case I set and use the named pipes (and i think this is meant with "named pipes" in bash)...

          Comment


          • #6
            @dietmar13: Since you have likely tested this already, does option 1 not work as written or it does?

            Comment


            • #7
              @GenoMax

              I didn't try 1 because 2 works. in 1 trimming will be made twice (would be a real waste of resources)...

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Strategies for Sequencing Challenging Samples
                by seqadmin


                Despite advancements in sequencing platforms and related sample preparation technologies, certain sample types continue to present significant challenges that can compromise sequencing results. Pedro Echave, Senior Manager of the Global Business Segment at Revvity, explained that the success of a sequencing experiment ultimately depends on the amount and integrity of the nucleic acid template (RNA or DNA) obtained from a sample. “The better the quality of the nucleic acid isolated...
                03-22-2024, 06:39 AM
              • seqadmin
                Techniques and Challenges in Conservation Genomics
                by seqadmin



                The field of conservation genomics centers on applying genomics technologies in support of conservation efforts and the preservation of biodiversity. This article features interviews with two researchers who showcase their innovative work and highlight the current state and future of conservation genomics.

                Avian Conservation
                Matthew DeSaix, a recent doctoral graduate from Kristen Ruegg’s lab at The University of Colorado, shared that most of his research...
                03-08-2024, 10:41 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, Yesterday, 06:37 PM
              0 responses
              12 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, Yesterday, 06:07 PM
              0 responses
              10 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-22-2024, 10:03 AM
              0 responses
              52 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 03-21-2024, 07:32 AM
              0 responses
              68 views
              0 likes
              Last Post seqadmin  
              Working...
              X