SEQanswers

SEQanswers (http://seqanswers.com/forums/index.php)
-   Bioinformatics (http://seqanswers.com/forums/forumdisplay.php?f=18)
-   -   How to get a report like stuff of a bam file how many percent of the exons are cover (http://seqanswers.com/forums/showthread.php?t=83862)

mhmtgenc 08-07-2018 12:24 AM

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 08-07-2018 02:58 AM

Try CollectHSmetrics - part of Picard Tools
For details see:
https://broadinstitute.github.io/pic...-overview.html

mhmtgenc 08-07-2018 03:22 AM

Quote:

Originally Posted by Gopo (Post 219265)
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?

Gopo 08-08-2018 10:11 PM

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

anoopkmr 08-11-2018 05:48 PM

This tools helps me create bed files from a gene list:
https://genome-euro.ucsc.edu/cgi-bin/hgTables

Choose bed format while downloading.


All times are GMT -8. The time now is 01:44 PM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2020, vBulletin Solutions, Inc.