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
Hi Sichan,
Could you tell me how get the correct BAM Alignment input file ? As I use the follow command lines:
bwa mem -t 2 -M hg19.fa NA12878_R1.fastq NA12878_R2.fastq > NA12878.sam
samtools view -bS NA12878.sam > NA12878.bam
java -jar SortSam.jar INPUT= NA12878.bam OUTPUT= NA12878.sort.bam SORT_ORDER=coordinate TMP_DIR=tmp_picard
java -jar AddOrReplaceReadGroups.jar I=NA12878.sort.bam O= NA12878_fixed.bam RGID=4 RGLB=lib1 RGPL=illumina RGPU=unit1 RGSM=20
(ThenValidateSamFile.jar
showsNo err found
)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.