Skip to content

Commit

Permalink
indel tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adamewing committed Nov 19, 2018
1 parent a81fc84 commit 5199d6d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/test_indel_del_ont.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

if [ $# -ne 1 ]
then
echo "usage: $0 <path to picard.jar>"
exit 65
fi

REF=../test_data/Homo_sapiens_chr22_assembly19.fasta

command -v addsnv.py >/dev/null 2>&1 || { echo "addsnv.py isn't installed" >&2; exit 65; }

if [ ! -e $1 ]
then
echo "cannot find picard.jar"
exit 65
fi


addindel.py -v ../test_data/test_ont_indel_del.txt -f ../test_data/testregion_ont.bam -r $REF -o ../test_data/testregion_ont_mut.bam -n 5 --picardjar $1 --aligner minimap2 --alignopts x:map-ont --seed 1234 --ignorepileup --single --mindepth 4

samtools sort ../test_data/testregion_ont_mut.bam > ../test_data/testregion_ont_mut.sorted.bam
mv ../test_data/testregion_ont_mut.sorted.bam ../test_data/testregion_ont_mut.bam
samtools index ../test_data/testregion_ont_mut.bam

#if [ $? -ne 0 ]
#then
# echo "addsnv.py failed. Are all the prequisites installed?"
# exit 1
#else
# samtools mpileup -ugf $REF ../test_data/testregion_mut.bam | bcftools call -vm
#fi
32 changes: 32 additions & 0 deletions test/test_indel_ins_ont.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

if [ $# -ne 1 ]
then
echo "usage: $0 <path to picard.jar>"
exit 65
fi

REF=../test_data/Homo_sapiens_chr22_assembly19.fasta

command -v addsnv.py >/dev/null 2>&1 || { echo "addsnv.py isn't installed" >&2; exit 65; }

if [ ! -e $1 ]
then
echo "cannot find picard.jar"
exit 65
fi


addindel.py -v ../test_data/test_ont_indel_ins.txt -f ../test_data/testregion_ont.bam -r $REF -o ../test_data/testregion_ont_mut.bam -n 5 --picardjar $1 --aligner minimap2 --alignopts x:map-ont --seed 1234 --ignorepileup --single --mindepth 4

samtools sort ../test_data/testregion_ont_mut.bam > ../test_data/testregion_ont_mut.sorted.bam
mv ../test_data/testregion_ont_mut.sorted.bam ../test_data/testregion_ont_mut.bam
samtools index ../test_data/testregion_ont_mut.bam

#if [ $? -ne 0 ]
#then
# echo "addsnv.py failed. Are all the prequisites installed?"
# exit 1
#else
# samtools mpileup -ugf $REF ../test_data/testregion_mut.bam | bcftools call -vm
#fi
1 change: 1 addition & 0 deletions test_data/test_ont_indel_del.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22 34169764 34169864 1.0 DEL
1 change: 1 addition & 0 deletions test_data/test_ont_indel_ins.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22 34169864 34169864 1.0 INS GG

0 comments on commit 5199d6d

Please sign in to comment.