Unconfigured Ad

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • mhmtgenc
    Junior Member
    • Nov 2016
    • 7

    How to get a report like stuff of a bam file how many percent of the exons are cover

    Dear Collegues,

    Lets say I have a miseq run and have the .bam file from the squencer and I would like to know how many percent of the exons (specific genes) are coverred in these .bam files?

    Is it possible?

    Thanks in advance
  • Gopo
    Member
    • Nov 2013
    • 41

    #2
    Try CollectHSmetrics - part of Picard Tools
    For details see:

    Comment

    • mhmtgenc
      Junior Member
      • Nov 2016
      • 7

      #3
      Originally posted by Gopo View Post
      Try CollectHSmetrics - part of Picard Tools
      For details see:
      https://broadinstitute.github.io/pic...-overview.html
      So how coul I be able to get a BED file or prepare it by myself? Could you give me a clue or a tutorial of this. Cause I have trouble on this. I know this is hard to expalin it here but can I get any file or manual for this?

      Comment

      • Gopo
        Member
        • Nov 2013
        • 41

        #4
        So, you will have to generate the BED file yourself based on the coordinates of the genes or exons that you are interested in.

        Code:
        # generate fasta index for genome (genome is AmexG_v3.0.0.fa)
        samtools faidx AmexG_v3.0.0.fa
        
        # create sequence dictionary
        java -Xmx64g -jar ~/bin/picard-2.18.10.jar CreateSequenceDictionary \
        R=AmexG_v3.0.0.fa \
        O=AmexG_v3.0.0.dict
        
        # convert Bed to interval list
        java -jar ~/bin/picard-2.18.10.jar BedToIntervalList \
        I=rfs.immunome.bed \
        O=rfs.immunome.interval.list \
        SD=AmexG_v3.0.0.dict
        
        # run CollectHsMetrics
        java -Xmx64g -jar ~/bin/picard-2.18.10.jar CollectHsMetrics \
        BAIT_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
        BAIT_SET_NAME=Immunome \
        TARGET_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
        METRIC_ACCUMULATION_LEVEL=SAMPLE \
        R=/ssdwork/jelber2/rfs/AmexG_v3.0.0.fa \
        I=ALL-samples.bam \
        O=ALL-samples-coverage-metrics.txt
        # note that you might have to add readgroups to the file ALL-samples.bam (whatever your BAM file is named) with

        Code:
        java -Xmx64g -jar ~/bin/picard.jar AddOrReplaceReadGroups \
            I=ALL-samples-recal-no-read-groups.bam \
            O=ALL-samples-recal-no-read-groups-for-callableloci.bam \
            SORT_ORDER=coordinate \
            RGPL=illumina \
            RGPU=barcode \
            RGLB=Lib1 \
            RGID=all \
            RGSM=all \
            VALIDATION_STRINGENCY=LENIENT

        Comment

        • Gopo
          Member
          • Nov 2013
          • 41

          #5
          Code:
          # install picard
          cd ~/bin/
          wget https://github.com/broadinstitute/picard/releases/download/2.18.10/picard.jar
          mv picard.jar picard-2.18.10.jar
          
          # reference genome is AmexG_v3.0.0.fa
          # generate fasta index
          samtools faidx AmexG_v3.0.0.fa
          
          # create sequence dictionary
          java -Xmx64g -jar ~/bin/picard-2.18.10.jar CreateSequenceDictionary \
          R=AmexG_v3.0.0.fa \
          O=AmexG_v3.0.0.dict
          
          # convert bed to interval list
          java -jar ~/bin/picard-2.18.10.jar BedToIntervalList \
          I=rfs.immunome.bed \
          O=rfs.immunome.interval.list \
          SD=AmexG_v3.0.0.dict
          
          # run CollectHsMetrics
          java -Xmx64g -jar ~/bin/picard-2.18.10.jar CollectHsMetrics \
          BAIT_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
          BAIT_SET_NAME=Immunome \
          TARGET_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
          METRIC_ACCUMULATION_LEVEL=SAMPLE \
          R=/ssdwork/jelber2/rfs/AmexG_v3.0.0.fa \
          I=ALL-samples.bam \
          O=ALL-samples-coverage-metrics.txt
          
          # if you need to add read groups
          java -Xmx64g -jar ~/bin/picard-2.18.10.jar AddOrReplaceReadGroups \
          I=ALL-samples.bam \
          O=ALL-samples.RG.bam \
          SORT_ORDER=coordinate \
          RGPL=illumina \
          RGPU=barcode \
          RGLB=Lib1 \
          RGID=all \
          RGSM=all \
          VALIDATION_STRINGENCY=LENIENT
          
          java -Xmx64g -jar ~/bin/picard-2.18.10.jar CollectHsMetrics \
          BAIT_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
          BAIT_SET_NAME=Immunome \
          TARGET_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
          METRIC_ACCUMULATION_LEVEL=SAMPLE \
          R=/ssdwork/jelber2/rfs/AmexG_v3.0.0.fa \
          I=ALL-samples.RG.bam \
          O=ALL-samples-coverage-metrics.txt

          Comment

          • Gopo
            Member
            • Nov 2013
            • 41

            #6
            [CODE]
            # install picard
            cd ~/bin/
            wget https://github.com/broadinstitute/picard/releases/download/2.18.10/picard.jar
            mv picard.jar picard-2.18.10.jar

            # reference genome is AmexG_v3.0.0.fa
            # generate fasta index
            samtools faidx AmexG_v3.0.0.fa

            # create sequence dictionary
            java -Xmx64g -jar ~/bin/picard-2.18.10.jar CreateSequenceDictionary \
            R=AmexG_v3.0.0.fa \
            O=AmexG_v3.0.0.dict

            # convert bed to interval list
            java -jar ~/bin/picard-2.18.10.jar BedToIntervalList \
            I=rfs.immunome.bed \
            O=rfs.immunome.interval.list \
            SD=AmexG_v3.0.0.dict

            # run CollectHsMetrics
            java -Xmx64g -jar ~/bin/picard-2.18.10.jar CollectHsMetrics \
            BAIT_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
            BAIT_SET_NAME=Immunome \
            TARGET_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
            METRIC_ACCUMULATION_LEVEL=SAMPLE \
            R=/ssdwork/jelber2/rfs/AmexG_v3.0.0.fa \
            I=ALL-samples.bam \
            O=ALL-samples-coverage-metrics.txt

            # if you need to add read groups
            java -Xmx64g -jar ~/bin/picard-2.18.10.jar AddOrReplaceReadGroups \
            I=ALL-samples.bam \
            O=ALL-samples.RG.bam \
            SORT_ORDER=coordinate \
            RGPL=illumina \
            RGPU=barcode \
            RGLB=Lib1 \
            RGID=all \
            RGSM=all \
            VALIDATION_STRINGENCY=LENIENT

            java -Xmx64g -jar ~/bin/picard-2.18.10.jar CollectHsMetrics \
            BAIT_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
            BAIT_SET_NAME=Immunome \
            TARGET_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
            METRIC_ACCUMULATION_LEVEL=SAMPLE \
            R=/ssdwork/jelber2/rfs/AmexG_v3.0.0.fa \
            I=ALL-samples.RG.bam \
            O=ALL-samples-coverage-metrics.txt
            [\CODE]

            Comment

            • Gopo
              Member
              • Nov 2013
              • 41

              #7
              You will have to make the BED file yourself. Here is a guide:

              Code:
              # install picard
              cd ~/bin/
              wget https://github.com/broadinstitute/picard/releases/download/2.18.10/picard.jar
              mv picard.jar picard-2.18.10.jar
              
              # index reference (Reference is AmexG_v3.0.0.fa)
              samtools faidx AmexG_v3.0.0.fa
              
              # create sequence dictionary
              java -Xmx64g -jar ~/bin/picard-2.18.10.jar CreateSequenceDictionary \
              R=AmexG_v3.0.0.fa \
              O=AmexG_v3.0.0.dict
              
              # Convert BED to interval list
              java -jar ~/bin/picard-2.18.10.jar BedToIntervalList \
              I=rfs.immunome.bed \
              O=rfs.immunome.interval.list \
              SD=AmexG_v3.0.0.dict
              
              # run CollectHsMetrics
              java -Xmx64g -jar ~/bin/picard-2.18.10.jar CollectHsMetrics \
              BAIT_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
              BAIT_SET_NAME=Immunome \
              TARGET_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
              METRIC_ACCUMULATION_LEVEL=SAMPLE \
              R=/ssdwork/jelber2/rfs/AmexG_v3.0.0.fa \
              I=ALL-samples.bam \
              O=ALL-samples-coverage-metrics.txt
              
              # if needed, add readgroups
              java -Xmx64g -jar ~/bin/picard.jar AddOrReplaceReadGroups \
              I=ALL-samples.bam \
              O=ALL-samples-RG.bam \
              SORT_ORDER=coordinate \
              RGPL=illumina \
              RGPU=barcode \
              RGLB=Lib1 \
              RGID=all \
              RGSM=all \
              VALIDATION_STRINGENCY=LENIENT
              
              # run CollectHsMetrics with ReadGroups added to BAM
              java -Xmx64g -jar ~/bin/picard-2.18.10.jar CollectHsMetrics \
              BAIT_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
              BAIT_SET_NAME=Immunome \
              TARGET_INTERVALS=/ssdwork/jelber2/rfs/rfs.immunome.interval.list \
              METRIC_ACCUMULATION_LEVEL=SAMPLE \
              R=/ssdwork/jelber2/rfs/AmexG_v3.0.0.fa \
              I=ALL-samples-RG.bam \
              O=ALL-samples-coverage-metrics.txt
              Best,
              Gopo
              Last edited by Gopo; 08-08-2018, 10:12 PM. Reason: wrong syntax for displaying code

              Comment

              • anoopkmr
                Junior Member
                • Aug 2018
                • 4

                #8
                This tools helps me create bed files from a gene list:


                Choose bed format while downloading.

                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
                11 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 07-09-2026, 10:04 AM
                0 responses
                25 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...