Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hosseinv
    Junior Member
    • Aug 2012
    • 8

    #1

    Merge multiple *.sai files in bwa ?

    I have illumina paired-end multiple-lane_reads of same individual which are distributed in 3 lanes like below;

    C09FNACXX_EGLOB-140092_GTCAGT_L008_R1_001.fastq
    C09FNACXX_EGLOB-140092_GTCAGT_L008_R1_002.fastq
    C09FNACXX_EGLOB-140092_GTCAGT_L008_R2_001.fastq
    C09FNACXX_EGLOB-140092_GTCAGT_L008_R2_002.fastq

    D0H2WACXX_EGLOB-140092_GTCAGT_L001_R1_001.fastq
    D0H2WACXX_EGLOB-140092_GTCAGT_L001_R1_002.fastq
    D0H2WACXX_EGLOB-140092_GTCAGT_L001_R2_001.fastq
    D0H2WACXX_EGLOB-140092_GTCAGT_L001_R2_002.fastq

    D0H2WACXX_EGLOB-140092_GTCAGT_L002_R1_001.fastq
    D0H2WACXX_EGLOB-140092_GTCAGT_L002_R1_002.fastq
    D0H2WACXX_EGLOB-140092_GTCAGT_L002_R2_001.fastq
    D0H2WACXX_EGLOB-140092_GTCAGT_L002_R2_002.fastq

    They are all representing one individual (140092).
    I am mapping these with BWA.
    Question:
    Are R1_001 and R2_001 in each lane the read-pairs?
    if yes, I will probably able to do the aln command as following:
    bwa aln refrencegenome.fa C09FNACXX_EGLOB-140092_ATATGA_L008_R1_001.fastq > aln_L008_1_1.sai
    bwa aln refrencegenome.fa C09FNACXX_EGLOB-140092_ATATGA_L008_R1_002.fastq > aln_L008_1_2.sai
    bwa aln refrencegenome.fa C09FNACXX_EGLOB-140092_ATATGA_L008_R2_001.fastq > aln_L008_2_1.sai
    bwa aln refrencegenome.fa C09FNACXX_EGLOB-140092_ATATGA_L008_R2_002.fastq > aln_L008_2_2.sai
    .
    ..
    ...
    if yes, then how can I merge them in bwa sampe?
    the original command is: bwa sampe ref.fa aln1.sai aln2.sai R1.fq R.fq > aln.sam
    Here I have a confusion, actually I don't have aln1.sai aln2.sai R1.fq R2.fq but instead I will have;
    aln1_1.sai aln1_2.sai aln2_1.sai aln2_2.sai for each lane.
    So how I can merge all the many *.sai files into a single final_aln.sam?

    My be I should consider R1_001 and R2_001 as paired reads and do the bwa sampe command as following;
    bwa sampe ref.fa aln_L008_1_1.sai aln_L008_2_1.sai L008_R1_001.fastq L008_R2_001.fastq > aln_L008_1.sam
    bwa sampe ref.fa aln_L008_1_2.sai aln_L008_2_2.sai L008_R1_002.fastq L008_R2_002.fastq > aln_L008_2.sam
    .
    ..
    ..
    and convert them to BAM files
    and then merge them with samtools like;
    samtools merge final.bam aln_L008_1.bam aln_L008_2.bam aln_L001_1.bam aln_L001_2.bam aln_L002_1.bam aln_L002_2.bam


    I hope the question is clear.
    I will be thankful to anyone who could help me with this question.
    Cheers, Hossein.
    Last edited by hosseinv; 09-09-2012, 10:38 PM.
  • Bukowski
    Senior Member
    • Jan 2010
    • 388

    #2
    Or you could just concatenate the R1 fastq files together into one file, repeat in the same order for the R2 fastq fles and then you have two fastq files for the one individual and can go down the normal process of mapping the reads without having to merge alignments later.

    Comment

    • hosseinv
      Junior Member
      • Aug 2012
      • 8

      #3
      I've heard combining fastq files is not really recommended as there might be issues like fragment length penalties and ... so best to merge bam files. So I think you are agree with the way I wrote above, yes?

      Comment

      • Bukowski
        Senior Member
        • Jan 2010
        • 388

        #4
        Originally posted by hosseinv View Post
        I've heard combining fastq files is not really recommended as there might be issues like fragment length penalties and ... so best to merge bam files. So I think you are agree with the way I wrote above, yes?
        Could you elaborate on this fragment length penalty issue? I've only seen this referenced with respect to Novalign, and you're using bwa.

        What I suggested is the most parsimonious solution and certainly wouldn't have suggested it if I wouldn't do it myself

        Comment

        • hosseinv
          Junior Member
          • Aug 2012
          • 8

          #5
          Hi Bukowski. As I mentioned I'd just heard about that but you are right it happens with Novoalign. it should'nt be same problem with BWA.

          Could you please tell me a website or manual describing BWA and SAMtools options in detail as those in http://bio-bwa.sourceforge.net/ and http://samtools.sourceforge.net/ are not sometimes clarified.

          Thanks again for your attention.

          Hosseinv

          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-22-2026, 11:13 AM
          0 responses
          26 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-22-2026, 10:48 AM
          0 responses
          20 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-15-2026, 10:52 AM
          0 responses
          36 views
          0 reactions
          Last Post SEQadmin2  
          Started by SEQadmin2, 10-14-2026, 05:39 AM
          0 responses
          43 views
          0 reactions
          Last Post SEQadmin2  
          Working...