Unconfigured Ad

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

    #1

    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:
                https://genome-euro.ucsc.edu/cgi-bin/hgTables

                Choose bed format while downloading.

                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
                30 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-22-2026, 10:48 AM
                0 responses
                22 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-15-2026, 10:52 AM
                0 responses
                39 views
                0 reactions
                Last Post SEQadmin2  
                Started by SEQadmin2, 10-14-2026, 05:39 AM
                0 responses
                45 views
                0 reactions
                Last Post SEQadmin2  
                Working...