Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Alphabets
    Junior Member
    • Mar 2016
    • 7

    lobSTR dealing with the paired-end BAM file

    Hello:

    I use the software lobSTR to deal with the paired-end bam file. As the document shows, I should run the follow code before the bam file sorted by read name.

    '''
    lobSTR \
    --index-prefix hg19_v3.0.2/lobstr_v3.0.2_hg19_ref/lobSTR_ \
    -f my_sample.bam --bampair \
    --rg-sample my_sample.sorted.bam --rg-lib my_sample \
    --out my_sample_output
    '''

    My question is which bam file ir right in the above code's third line and fourth line, the bam before sorted or after sorted?
    The document shows there should be the bam file before sorted, but I think it should be the sorted rather than the raw bam file in the third line.
    Besides, I think the fourth line should be a tag not the sorted file.

    Any other ideas about it and could anyone solve my confusion. Thanks!
  • mastal
    Senior Member
    • Mar 2009
    • 666

    #2
    The --rg-sample and --rg-lib parameters should be tags with read-group information, not the bam files.

    See the lobSTR FAQs for more info.

    VIP Escorts Dubai services for elegant evenings, private events, business dinners and luxury companionship. Discreet, refined and professional companion service in Dubai.


    I think if you start with a bam file rather than fastq files then it should be sorted and indexed. Note that the command line options description for --bampair says that the file should be sorted by name order, 'samtools sort -n'.

    Comment

    • Alphabets
      Junior Member
      • Mar 2016
      • 7

      #3
      Originally posted by mastal View Post
      The --rg-sample and --rg-lib parameters should be tags with read-group information, not the bam files.

      See the lobSTR FAQs for more info.

      VIP Escorts Dubai services for elegant evenings, private events, business dinners and luxury companionship. Discreet, refined and professional companion service in Dubai.


      I think if you start with a bam file rather than fastq files then it should be sorted and indexed. Note that the command line options description for --bampair says that the file should be sorted by name order, 'samtools sort -n'.
      I know what you mean, the --rg-sample and --rg-lib parameters should not be the bam files. But I am confused of the third line "-f my_sample.bam --bampair". I think the -f parameter should be the sorted bam not the raw bam. The document shows it is the raw bam not the sorted bam file,which confuse me.

      the document is:
      VIP Escorts Dubai services for elegant evenings, private events, business dinners and luxury companionship. Discreet, refined and professional companion service in Dubai.

      Comment

      • mastal
        Senior Member
        • Mar 2009
        • 666

        #4
        In the end, it shouldn't matter, because anything that is expecting an unsorted bam file will work perfectly well if you give it a sorted bam file (but of course the reverse is not true, and if a program is expecting a sorted bam file it will throw an error if you give it an unsorted bam file).

        I agree with you that the lobSTR documentation is confusing and not consistent. I had looked at the 'usage' page, which seems to give different examples than the genotype-calling page you gave the link to. Also in the usage page's definition of parameters, for --bampair it says that you have to give a bam file sorted by name (samtools sort -n), which it doesn't mention anywhere else where it shows examples of sorting the bam files with samtools sort.

        Comment

        • mastal
          Senior Member
          • Mar 2009
          • 666

          #5
          I think maybe I understand a bit better now.

          I think if you are running lobSTR with a paired-end bam file, you need to give it a bam file that has been name-sorted (samtools sort -n) for the -f parameter, because it needs the two reads of a pair to be next to each other in the file.

          Later steps, like running allelotype, may need bam files sorted by coordinate, as shown in some of the examples where they sort the bam files that are output from running losSTR.

          Hope this makes more sense.

          Comment

          • Alphabets
            Junior Member
            • Mar 2016
            • 7

            #6
            Originally posted by mastal View Post
            I think maybe I understand a bit better now.

            I think if you are running lobSTR with a paired-end bam file, you need to give it a bam file that has been name-sorted (samtools sort -n) for the -f parameter, because it needs the two reads of a pair to be next to each other in the file.

            Later steps, like running allelotype, may need bam files sorted by coordinate, as shown in some of the examples where they sort the bam files that are output from running losSTR.

            Hope this makes more sense.


            Thank you for your reply. I agree with you, but there is something wrong with me.

            When I run lobSTR with my name-sorted paired-end bam file just like what you mentioned, I get the follow warnings:

            '''
            WARNING: Could not find pair for BRISCOE:4:... Is the bam file sorted by read name?
            '''

            All my screen is full of the warnings. Is it nomal?

            Besides, I when I run allelotype with the bam it generates, I also get the warnings in my output:

            '''
            WARNING: Skipping locus chr1:123585375. Invalid period size (20)
            WARNING: Discarding duplicate of locus chr1: 123587826
            '''

            I don't know what it means and what should I do?

            Thank you.
            Last edited by Alphabets; 03-21-2016, 05:03 AM.

            Comment

            • mastal
              Senior Member
              • Mar 2009
              • 666

              #7
              Where do the bam files you are trying to use with lobSTR come from?

              Are they unaligned bams, or are they the result of alignment with another aligner?

              Have any reads been removed from the data set? For example, reads that didn't align, leaving some reads without a mate?

              Comment

              • Alphabets
                Junior Member
                • Mar 2016
                • 7

                #8
                Originally posted by mastal View Post
                Where do the bam files you are trying to use with lobSTR come from?

                Are they unaligned bams, or are they the result of alignment with another aligner?

                Have any reads been removed from the data set? For example, reads that didn't align, leaving some reads without a mate?
                The bam files I use are alignment of HiSeq reads aligned to the reference genome, removed redundancy and base realignments were done.

                Does it matter? And how should I do?

                Thank you!

                Comment

                Latest Articles

                Collapse

                • 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
                • SEQadmin2
                  Nine Things a Sample Prep Scientist Thinks About Before Sequencing
                  by SEQadmin2


                  I’m not a sequencing expert. I’m a purification scientist who uses NGS to evaluate workflows my group develops. With this perspective, we think about the sample first and the NGS workflow second. The sequencer is an exceptionally honest reporter, but it can only report on what you give it, so whether you get clean, interpretable data from an NGS workflow is largely determined before you begin.

                  Here are nine questions we think about, in roughly the order they matter, before...
                  06-18-2026, 07:11 AM

                ad_right_rmr

                Collapse

                News

                Collapse

                Topics Statistics Last Post
                Started by SEQadmin2, Yesterday, 11:05 AM
                0 responses
                7 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-02-2026, 11:08 AM
                0 responses
                28 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 06-30-2026, 05:37 AM
                0 responses
                27 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 06-26-2026, 11:10 AM
                0 responses
                27 views
                0 reactions
                Last Post SEQadmin2  
                Working...