Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • twu
    Developer of GMAP and GSNAP
    • Oct 2011
    • 17

    #16
    Meaning of -n and -Q

    The -n flag limits the number of results reported, not the number of alignment results. Suppose you specify "-n 1", and GSNAP finds no alignments to the genome. Then the result would contain 0 hits, obviously. Likewise, if GSNAP finds 1 hit in the genome, the result would contain that one hit. But if GSNAP found multiple hits, then the "-n 1" flag would constrain the results to a single one.

    To find uniquely matching hits, you would need to add the "-Q" or "--quiet-if-excessive" flag. With "-n 1" and that flag, if GSNAP found multiple hits, then it would pretend that it really found no (unique) hits to the genome, and report no hits.

    I hope that makes sense. If you have other questions, you can also join the gsnap-users mailing list at EBI.

    Tom

    Comment

    • ppoudel
      Junior Member
      • Feb 2012
      • 5

      #17
      Thanks Parthav and Thomas!!!

      I have ~5 GB (each) of paired end reads from RNA seq experiment and I would like use GSNAP in HPC farm, however, the farm allows 12 hours maximum for a job. I tried to use 1 nodes and 16 process , time=12 hours and memory 64000. But the job crashed. Is there any way I can run this in HPC within 12 hours.

      Comment

      • twu
        Developer of GMAP and GSNAP
        • Oct 2011
        • 17

        #18
        Running GSNAP on a farm

        For HPC or Linux farms, it is probably best if you run GSNAP on several nodes for a given input file. You can do this easily with the -q or --part flag, which breaks up the input into parts. For example, if you want to spread the GSNAP computation over 50 nodes, you can run GSNAP like this:

        gsnap -q 00/50 <fastq file> > output.00
        gsnap -q 01/50 <fastq file> > output.01
        gsnap -q 02/50 <fastq file> > output.02
        ...
        gsnap -q 49/50 <fastq file> > output.49

        The meaning of "-q 02/50" is that in every set of 50 input reads, compute on the second one. If you submit each of the above jobs to a different node on your cluster, you should theoretically see a 50x speedup. However, your output will be spread among 50 different files.

        Note that I am working on making GSNAP a bit faster, but adding an initial alignment step that computes the easy alignments very quickly, but falls back upon the existing algorithm to harder alignments.

        Regards,

        Tom

        Comment

        • ParthavJailwala
          Member
          • Oct 2009
          • 27

          #19
          Tom,

          Thanks for your input on how to break up the input fastq file into parts for using multiple HPC nodes, using the "-q" flag.
          In case of a gsnap mapping run involving paired-end fastq reads, I am wondering how the '-q' works. How would one specify picking the read-pairs from the R1 and R2 files?

          Thanks
          Parthav


          Originally posted by twu View Post
          For HPC or Linux farms, it is probably best if you run GSNAP on several nodes for a given input file. You can do this easily with the -q or --part flag, which breaks up the input into parts. For example, if you want to spread the GSNAP computation over 50 nodes, you can run GSNAP like this:

          gsnap -q 00/50 <fastq file> > output.00
          gsnap -q 01/50 <fastq file> > output.01
          gsnap -q 02/50 <fastq file> > output.02
          ...
          gsnap -q 49/50 <fastq file> > output.49

          The meaning of "-q 02/50" is that in every set of 50 input reads, compute on the second one. If you submit each of the above jobs to a different node on your cluster, you should theoretically see a 50x speedup. However, your output will be spread among 50 different files.

          Note that I am working on making GSNAP a bit faster, but adding an initial alignment step that computes the easy alignments very quickly, but falls back upon the existing algorithm to harder alignments.

          Regards,

          Tom

          Comment

          • twu
            Developer of GMAP and GSNAP
            • Oct 2011
            • 17

            #20
            -q flag and paired-end reads

            If you have paired-end reads (by providing two files to GSNAP), then the -q flag takes the correct pairs from each of the files. That's the only thing that makes sense.

            For example, -q 2/50 takes the second read out of each set of 50, from each of the two files.

            Tom

            Comment

            • ppoudel
              Junior Member
              • Feb 2012
              • 5

              #21
              Thanks Tom.

              Comment

              • amolkolte
                Junior Member
                • Dec 2012
                • 8

                #22
                I have been running GSNAP as a part of trinity pipeline.

                To begin with, I have paired ends reads of 7GB of size for each read file.
                The pipeline has executed the following code,

                Code:
                gsnap -d target.gmap -D . -A sam -N 1 -w 10000 -n 20 -t 45 /home/amol/trimmed_datasets/AP_treated/R33_APT_s_3_1_trimmed.fastq /home/amol/trimmed_datasets/AP_treated/R33_APT_s_3_2_trimmed.fastq
                More that 30 hours have been passed and the script is showing a message "Starting alignment". I can see (using top) that, gsnap is taking resources but at the same time its showing the process status as 'sleeping'

                Can anyone please explain.

                Thanks

                Comment

                • amolkolte
                  Junior Member
                  • Dec 2012
                  • 8

                  #23
                  After running for 6 days, gsnap finally generated an 34 GB sam file.

                  Alternatively, I noticed at later point that you can monitor the output file size under your 'gsnap_out' directory and estimate where the alignment have reached.

                  Code:
                  du -h gsnap_out/gsnap.sam
                  File size would increase as the alignment proceeds and you can make sure that the program is running.

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    Multiomic Liquid Biopsy: What DNA/RNA Panels Reveal That DNA Alone Can’t
                    by SEQadmin2



                    Tumors contain complex mixtures of cell populations that evolve in response to treatment and host-specific factors. Tissue biopsies provide only static snapshots of a tumor’s state. But what if we could follow that evolution over time using a minimally invasive technique?

                    Liquid biopsies can detect tumor-derived material circulating in the bloodstream, providing a way to study treatment response, detect emerging resistance, and discover new biomarkers. Circulating
                    ...
                    10-14-2026, 09:55 AM
                  • SEQadmin2
                    New Genomics Technologies Take Aim at Long-Standing Limits
                    by SEQadmin2


                    Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                    We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                    ...
                    09-28-2026, 10:25 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, 10-15-2026, 10:52 AM
                  0 responses
                  23 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-14-2026, 05:39 AM
                  0 responses
                  29 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-13-2026, 09:56 AM
                  0 responses
                  25 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 10-09-2026, 11:14 AM
                  0 responses
                  28 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...