Skip to content

Commit

Permalink
added patternfile tester to patterngenerator
Browse files Browse the repository at this point in the history
  • Loading branch information
SooLee committed Mar 7, 2018
1 parent 7f4abb8 commit d45a4fd
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
Binary file modified ngscheckmate_fastq-source/patternconvert.h.gch
Binary file not shown.
15 changes: 15 additions & 0 deletions patterngenerator/makesnvpattern.pl
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,18 @@
system("${scriptdir}filter_patters_based_on_ntm.pl $outdir/$outprefix.txt $outdir/$outprefix.ntm > $outdir/$outprefix.uniq.txt");
system("${scriptdir}patternconverter $outdir/$outprefix.uniq.txt $outdir/$outprefix.pt");

# test
print("Checking pattern file...\n");
system("${scriptdir}patterntestreader $outdir/$outprefix.pt $outdir/$outprefix.pt-txt");
system("sort $outdir/$outprefix.pt-txt > $outdir/$outprefix.pt-txt.sorted");
system("sort $outdir/$outprefix.uniq.txt > $outdir/$outprefix.uniq.txt.sorted");
$diff=`diff $outdir/$outprefix.pt-txt.sorted $outdir/$outprefix.uniq.txt.sorted`;
if($diff!~/\S/){
print("pattern file looks good!\n");
exit(0);
}
else {
print("pattern file does not look good.\n");
exit(1);
}

3 changes: 3 additions & 0 deletions tests/test.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -e

# patterngenerator test
./patterngenerator/makesnvpattern.pl tests/SNP_GRCh37_hg19_woChr_21part.bed tests/GRCh37_21part.multi.fa tests/GRCh37_21part tests out
Expand All @@ -8,3 +9,5 @@

# remove test pattern files
rm tests/out*

set +e

0 comments on commit d45a4fd

Please sign in to comment.