Skip to content

Commit

Permalink
try to test prancSTR and simTR example commands
Browse files Browse the repository at this point in the history
  • Loading branch information
aryarm committed Nov 22, 2023
1 parent f4f98dc commit 8cd4923
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/cmdline_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ if [ $# -eq 0 ]; then
# use default example location
EXDATADIR="example-files"
BEAGLEDIR="trtools/testsupport/sample_vcfs/beagle"
SIMTRDIR="trtools/testsupport/simtrdata"
elif (( $# != 2 )) ; then
echo "usage: cmdline_tests.sh {example_dir} {beagle_dir}" 2>&1
echo "Expected 2 arguments but recieved $#" 2>&1
Expand All @@ -48,6 +49,16 @@ runcmd_pass "python -c 'import trtools; print(trtools.__version__)'"

# Check for valid/invalid output locations

# Example command running prancSTR for only one chromosome with hipstr output file
# --only-passing skips VCF records with non-passing filters
runcmd_pass "prancSTR --vcf ${EXDATADIR}/CEU_subset.vcf.gz --out ${TMPDIR}/CEU_chr1 --vcftype hipstr --only-passing --region chr1"
# Example command running prancSTR for only one sample
runcmd_pass "prancSTR --vcf ${EXDATADIR}/CEU_subset.vcf.gz --only-passing --out ${TMPDIR}/NA12878_chr1 --samples NA12878"

# Example command running simTR for a dummy dataset with dummy allele bed file and other input parameters
mkdir ${TMPDIR}/test-simtr
runcmd_pass "simTR --coords chr11_CBL:5001-5033 --ref ${SIMTRDIR}/CBL.fa --outprefix ${TMPDIR}/test-simtr --tmpdir ${TMPDIR}/test-simtr --repeat-unit CGG --art art_illumina --coverage 1000 --read-length 150 --seed 12345 --u 0.02 --d 0.02 --rho 0.9"

runcmd_pass "statSTR --vcf ${EXDATADIR}/NA12878_chr21_gangstr.sorted.vcf.gz --out ${TMPDIR}/test --mean"
runcmd_fail "statSTR --vcf ${EXDATADIR}/NA12878_chr21_gangstr.sorted.vcf.gz --out ${TMPDIR}/kittens/xxx --mean"
runcmd_pass "statSTR --vcf ${EXDATADIR}/NA12878_chr21_gangstr.sorted.vcf.gz --out ${TMPDIR} --mean"
Expand Down

0 comments on commit 8cd4923

Please sign in to comment.