Seqanswers Leaderboard Ad

Collapse

Announcement

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

  • How to pipe Bowtie's commands

    Dear all

    How can i pipe the following bowtie's commands so the terminal on mac would run them all at once

    bowtie-build mainseq.fasta build
    bowtie -S build -f -I 20 -X 7500 -a -m 1 -v 3 --rf -1 reads_1.fasta -2 reads_2.fasta aligned.sam
    samtools view -bS aligned.bam aligned.sam
    samtolls sort aligned.bam aligned.sorted
    samtools index aligned.sorted.bam
    Many thanks for your help.

  • #2
    Code:
    bowtie2 -x $your_ref -U $in | samtools view -bSu - | samtools sort - $out
    That's how I do it.

    Comment


    • #3
      put the commands in a shell script and run the shell script.

      you have to have bowtie and samtools installed on your Mac and added to your path.

      use a text editor to create a file called something like 'run_bowtie.sh'.

      put something like '#!/bin/bash' or whatever shell you are using, as the first line of the script,

      paste the rest of the commands into the file and save it.

      then run it from the terminal window.

      $./run_bowtie.sh

      Comment


      • #4
        Thanks mastal, it has worked.

        Thanks sdarko, it has not worked, it seems i should use bowtie2 to ge it worked.

        I am still wondering if piping would work as efficient as creating a small bash program, which has worked perfectly with me as mastal has suggested.

        Many thanks

        Comment


        • #5
          Sorry, i should have mentioned that i had to use the following code to add executable permissions to the bash shell file to work:

          chmod u+x run_bowtie

          Then you can run it as mentioned by mastal:
          ./run_bowtie

          Comment


          • #6
            Originally posted by Fad2012 View Post
            I am still wondering if piping would work as efficient as creating a small bash program, which has worked perfectly with me as mastal has suggested.
            In theory a pipe avoids writing all the intermediate results to the disk thus is more efficient, sadly it is not always possible/easy to combine different tools with pipelines.

            Comment


            • #7
              Originally posted by Fad2012 View Post
              Thanks sdarko, it has not worked, it seems i should use bowtie2 to ge it worked.

              I am still wondering if piping would work as efficient as creating a small bash program, which has worked perfectly with me as mastal has suggested.
              I think this would work for bowtie:
              Code:
              bowtie -S -f -I 20 -X 7500 -a -m 1 -v 3 --rf build -1 reads_1.fasta -2 reads_2.fasta | samtools view -bSu - | samtools sort - aligned.sorted
              I generally generate bash scripts that use piping to be most efficient so as to not make intermediate files.

              Comment

              Latest Articles

              Collapse

              • seqadmin
                Recent Advances in Sequencing Analysis Tools
                by seqadmin


                The sequencing world is rapidly changing due to declining costs, enhanced accuracies, and the advent of newer, cutting-edge instruments. Equally important to these developments are improvements in sequencing analysis, a process that converts vast amounts of raw data into a comprehensible and meaningful form. This complex task requires expertise and the right analysis tools. In this article, we highlight the progress and innovation in sequencing analysis by reviewing several of the...
                Today, 07:48 AM
              • seqadmin
                Essential Discoveries and Tools in Epitranscriptomics
                by seqadmin




                The field of epigenetics has traditionally concentrated more on DNA and how changes like methylation and phosphorylation of histones impact gene expression and regulation. However, our increased understanding of RNA modifications and their importance in cellular processes has led to a rise in epitranscriptomics research. “Epitranscriptomics brings together the concepts of epigenetics and gene expression,” explained Adrien Leger, PhD, Principal Research Scientist...
                04-22-2024, 07:01 AM

              ad_right_rmr

              Collapse

              News

              Collapse

              Topics Statistics Last Post
              Started by seqadmin, Today, 07:17 AM
              0 responses
              11 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 05-02-2024, 08:06 AM
              0 responses
              19 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-30-2024, 12:17 PM
              0 responses
              20 views
              0 likes
              Last Post seqadmin  
              Started by seqadmin, 04-29-2024, 10:49 AM
              0 responses
              28 views
              0 likes
              Last Post seqadmin  
              Working...
              X