PDA

View Full Version : how to convert cram to bam?



maroco
10-11-2020, 02:08 PM
Hi, I just received my nebula results but I do not know how to convert my cram to a bam file I have no experience in this. I would greatly appreciate it if someone could teach me how to do this

MacUalraig
10-11-2020, 02:27 PM
Remember IGV will work with CRAM files direct as long as you have the index file (.crai) too. Also you don't need to convert to share with YFull either. What are you trying to do that only works off a BAM file?

aaronbee2010
10-11-2020, 02:42 PM
Hi, I just received my nebula results but I do not know how to convert my cram to a bam file I have no experience in this. I would greatly appreciate it if someone could teach me how to do this

Quoted from my instructions here (https://anthrogenica.com/showthread.php?16376-Nebula-Genomics&p=696191&viewfull=1#post696191).


Firstly, you'll need to download WGSExtract (Program: http://37.187.22.93/wgsextract/WGSExtractBeta.zip - Manual: http://bit.ly/36Jdpnq). When downloaded, right-click WGSExtractBeta.zip and click on "Extract all" then click "Extract" without changing anything. The following instructions assume that you've downloaded WGSExtractBeta.zip to the same folder as your CRAM and CRAI files and that you used the default extraction destination provided after clicking "Extract all"

Load the command prompt (you don't need to run it as administrator), move to the folder where you downloaded WGSExtract and your Nebula data, then copy the following into there:


WGSExtractBeta\WGSExtract\programs\samtools-mingw\samtools.exe view [email protected] -hb -T WGSExtractBeta\WGSExtract\reference_genomes\GCA_00 0001405.15_GRCh38_no_alt_analysis_set.fna.gz -o X.bam X.cram && WGSExtractBeta\WGSExtract\programs\samtools-mingw\samtools.exe index [email protected] X.bam

Where X.cram is your CRAM file and X.bam is the BAM file being produced from it.

maroco
10-11-2020, 03:30 PM
Quoted from my instructions here (https://anthrogenica.com/showthread.php?16376-Nebula-Genomics&p=696191&viewfull=1#post696191).

What’s sam tools? Can I get a link for this application

aaronbee2010
10-11-2020, 03:38 PM
What’s sam tools? Can I get a link for this application

It comes with WGSExtract (where it exists as a Windows executable) so just download that. I don't know many other sources for samtools as a Windows executable.

maroco
10-11-2020, 06:00 PM
Quoted from my instructions here (https://anthrogenica.com/showthread.php?16376-Nebula-Genomics&p=696191&viewfull=1#post696191).

it says failed to open for reading when I run your prompt

aaronbee2010
10-11-2020, 06:13 PM
it says failed to open for reading when I run your prompt

Check your PM.