Anyone used BAMSurgeon to spike in 1KB insertions/deletions?
1
0
Entering edit mode
8.6 years ago
sichan ▴ 90

Hi Everyone,

I'm interested in using BAMSurgeon to spike in structural variants up to 1KB in length to my BAM.

Here's my command:

python addsv.py -v SVs.bed -f Input_BAM -r hg19.fa -o Output_BAM > out.txt 2>error.txt

Where SVs.bed contains the following:

20    8189474    8190474    DEL    1.0
20    8771681    8772777    DEL    1.0
20    8823637    8823638    INS    myseq210.fa
20    11753526    11753527    INS    myseq731.fa

The last two entries are insertions and the myseq*.fa are fasta files and each contain a 1KB randomly generated nucleotide sequence.

Within my error.txt file, I see the following for each of the four SVs I'm attempting to spike-in:

encountered error in mutation spikein: 20    11753526    11753527    INS    myseq731.fa

Traceback (most recent call last):
  File "../addsv.py", line 435, in makemut
    maxcontig, refseq, alignstats, refstart, refend, qrystart, qryend, tgtstart, tgtend = trim_contig(mutid, chrom, start, end, maxcontig, reffile)
ValueError: need more than 2 values to unpack

My out.txt file ends with the following

INFO    2015-09-21 14:07:35.645967    no succesful [sic] mutations

So, none of the mutations were spiked-in successfully and no output BAM is created. I can share both files if necessary, but has anyone encountered these errors?

Also, if anyone knows of other tools to spike SNVs/Indels/SVs into BAMs, please let me know.

Thanks

bam bamsurgeon genome svs • 3.5k views
ADD COMMENT
0
Entering edit mode

Hi Sichan,

Could you tell me how get the correct BAM Alignment input file ? As I use the follow command lines:

  1. bwa mem -t 2 -M hg19.fa NA12878_R1.fastq NA12878_R2.fastq > NA12878.sam
  2. samtools view -bS NA12878.sam > NA12878.bam
  3. java -jar SortSam.jar INPUT= NA12878.bam OUTPUT= NA12878.sort.bam SORT_ORDER=coordinate TMP_DIR=tmp_picard
  4. java -jar AddOrReplaceReadGroups.jar I=NA12878.sort.bam O= NA12878_fixed.bam RGID=4 RGLB=lib1 RGPL=illumina RGPU=unit1 RGSM=20 (Then ValidateSamFile.jar shows No err found)
  5. samtools index NA12878_fixed.bam

I do not know whether it is right. Do I need to re-align reads to the reference? If so, how to do this re-align ?

Thanks.

ADD REPLY
3
Entering edit mode
8.6 years ago
Adam Ewing ▴ 70

Hi Simon,

Could you double check that you have the latest from the repository (git pull) and see if you can get the test (test/test_sv.sh) to run?

Also, if you like, please send command lines / full error output to me (adam.ewing@gmail.com) and I'd be happy to have a look.

ADD COMMENT
0
Entering edit mode

Thanks for your response, Adam. I just sent you an email.

ADD REPLY

Login before adding your answer.

Traffic: 1569 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6