Unconfigured Ad

Collapse
X
 
  • Filter
  • 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
                    Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
                    by SEQadmin2



                    Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
                    ...
                    07-09-2026, 11:10 AM
                  • SEQadmin2
                    Cancer Drug Resistance: The Lingering Barrier to Rising Survival
                    by SEQadmin2



                    Cancer survival rates have significantly increased in the last few decades in the United States, reaching a combined 70% 5-year survival rate by 2021. Behind this number, there are years of research to find new therapies, drug targets, and early detection methods. But there is one core challenge that keeps slowing down these advances, and it’s about drug resistance.

                    There is no single reason why many patients don’t respond to treatment as expected. Cancer is...
                    07-08-2026, 05:17 AM
                  • GATTACAT
                    Reply to Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                    by GATTACAT
                    Love this - good data definitely starts from good input, and poor input can only give relatively poor data. I particularly like the mention of Nanodrop/absorbance based methods for quantification. It's such a toss up if you'll get an accurate reading or what amounts to a randomly generated number, and a lot of library/sequencing related issues can be traced back to poor quant.
                    07-01-2026, 11:43 AM

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, Yesterday, 10:26 AM
                  0 responses
                  13 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-09-2026, 10:04 AM
                  0 responses
                  26 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-08-2026, 10:08 AM
                  0 responses
                  16 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-07-2026, 11:05 AM
                  0 responses
                  33 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...