Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Layla
    Member
    • Sep 2008
    • 58

    #1

    multiple runs and maq

    How do you do an alignment (./ maq map command) in maq when you have run more than one lane on a Solexa machine on the same sample?
    Can you simply append the reads,

    ./maq map n.read1.bfq in.read2.bfq in.read3.bfq etc etc?


    Cheers
    L
  • zee
    NGS specialist
    • Apr 2008
    • 249

    #2
    Layla,

    If you have tried that command by now you know it would never work.

    At most 2 bfq files can be given and these are assumed to contain paired-end reads. If one file is given then just single-lane.

    So, if you have all your *sequence.txt files use a for loop on these astq files:

    for file in `ls *sequence.txt`
    do
    maq fastq2bfq $file $file.bfq
    maq map $file.map genome.bfa $file.bfq
    done

    Comment

    • dakl
      Member
      • May 2009
      • 15

      #3
      Zee,

      Would it be possible to parallelize this over several CPU cores in a simple manner? Kind of like PBS for cluster jobs, but locally.

      cheers
      D

      Comment

      • zee
        NGS specialist
        • Apr 2008
        • 249

        #4
        Dakl,

        I use novoalign for most of my mutli-core jobs, but it should be possible to do something similar with maq.

        If you have a large database to search you might run into some problems. I would split all my files into batches of N-1, N= no. CPUs - I like to keep one free for system, IO,etc.


        ls *.fastq | split -l <N-1> BATCH


        Then for each batch run a loop

        for file in `cat BATCH...`
        do
        maq fastq2bfq $file $file.bfq
        maq map $file.map genome.bfa $file.bfq
        done &
        And dont forget the "&" which places each loop in the background.

        Comment

        • Layla
          Member
          • Sep 2008
          • 58

          #5
          Hi zee,

          Thankyou for your reply but I have been receiving a bizarre error:Assertion failed: (fp_bfa), function ma_match, file match.cc, line 516

          for file in `ls *.bfq`
          do
          ./maq map $file.map genome.bfa $file.bfq
          done

          From the paired end experiment I have a total of 3 pairs stored in one folder:
          s_1.bfq s_2.bfq
          t_1.bfq t_2.bfq
          u_1.bfq u_2.bfq

          I didnt understand how/where the ./maq map loop looks at s_1.bfq s_2.bfq and then t_1.bfq t_2.bfq, u_1.bfq u_2.bfq.

          Thank you for your help

          L

          Comment

          • zee
            NGS specialist
            • Apr 2008
            • 249

            #6
            OK, it is a simple change to the ff:

            Code:
            for base in `echo s t u`; do
              ./maq map $base.map genome.bfa $base"_1.bfq" $base"_2.bfq"
            done

            Originally posted by Layla View Post
            Hi zee,

            Thankyou for your reply but I have been receiving a bizarre error:Assertion failed: (fp_bfa), function ma_match, file match.cc, line 516

            for file in `ls *.bfq`
            do
            ./maq map $file.map genome.bfa $file.bfq
            done

            From the paired end experiment I have a total of 3 pairs stored in one folder:
            s_1.bfq s_2.bfq
            t_1.bfq t_2.bfq
            u_1.bfq u_2.bfq

            I didnt understand how/where the ./maq map loop looks at s_1.bfq s_2.bfq and then t_1.bfq t_2.bfq, u_1.bfq u_2.bfq.

            Thank you for your help

            L

            Comment

            • Layla
              Member
              • Sep 2008
              • 58

              #7
              Thanx Zee. Since multiple runs are carried out to increase the number of reads, why is it that a separate .map file is being created for each pair (so a total of 3)? Is the purpose not to merge all the pairs and generate a single .map file to increase genome coverage?

              Actually whilst writing, is this where I can use the ./maq merge command?

              Cheers
              L

              Comment

              • jnfass
                Member
                • Aug 2008
                • 88

                #8
                You got it ... after you've generated all the maps, use maq merge to combine them into one map, from which you can generate a pileup, consensus, etc ...

                Comment

                • dakl
                  Member
                  • May 2009
                  • 15

                  #9
                  Hi all,

                  Since Maq is optimized for ~2M reads as input, I managed to do the following:

                  Code:
                  time maq fastq2bfq -n 2000000 ../50a_fastq.single.fastq 50a
                  to create several bfq-files containing the reads, and then use the perl module Parallel::ForkManager to fork the process. See the script below for details.

                  Code:
                  #!/usr/bin/perl -w
                  
                  use strict;
                  use Parallel::ForkManager;
                  
                  my $pm = new Parallel::ForkManager(4); # number of parallel processes is 4
                  while(<>){
                          chomp;
                  
                          # Forks and returns the pid for the child:
                          my $pid = $pm->start and next; 
                          
                          qx/ maq match -c $_.map ~\/hg18\/hg18.bfa $_/; 
                          
                      $pm->finish; # Terminates the child process
                  }

                  Comment

                  Latest Articles

                  Collapse

                  • SEQadmin2
                    Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
                    by SEQadmin2


                    Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

                    The systematic characterization of the human proteome has
                    ...
                    07-20-2026, 11:48 AM
                  • 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

                  ad_right_rmr

                  Collapse

                  News

                  Collapse

                  Topics Statistics Last Post
                  Started by SEQadmin2, Today, 02:55 AM
                  0 responses
                  4 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-24-2026, 12:17 PM
                  0 responses
                  10 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-23-2026, 11:41 AM
                  0 responses
                  11 views
                  0 reactions
                  Last Post SEQadmin2  
                  Started by SEQadmin2, 07-20-2026, 11:10 AM
                  0 responses
                  23 views
                  0 reactions
                  Last Post SEQadmin2  
                  Working...