Skip to content

Commit

Permalink
modified: CITS.pl
Browse files Browse the repository at this point in the history
add --maxN flag
  • Loading branch information
zhangchaolin committed Mar 24, 2024
1 parent 9337072 commit 4ff5243
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CITS.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

my $bigFile = ""; #if yes, we need to use cache
#my $minBlockSize = 2000000;
my $maxN = -1; #max no of truncations, default=no limit, it will be slow when the number is large (e.g. > 5000)

my $pvalueThreshold = 0.01;
my $multiTestCorrection = "";
my $maxGap = -1;
Expand All @@ -29,6 +31,7 @@

GetOptions (
'big'=>\$bigFile,
'maxN:i'=>\$maxN,
'p:f'=>\$pvalueThreshold,
'multi-test'=>\$multiTestCorrection,
'gap:i'=>\$maxGap,
Expand All @@ -44,6 +47,7 @@
print " -big : the input tag file is big\n";
print " -p [double] : p-value threshold ($pvalueThreshold)\n";
print " --multi-test : perform bonferroni multiple test correction\n";
print " --max-N [int] : max number of reads with truncations (default = -1, no limit, consider e.g., 5000 if it is too slow)\n";
print " --gap [int] : max gap used to cluster CITS ($maxGap, -1=no cluster)\n";
print " -c [string] : cache dir ($cache)\n";
print " -v : verbose\n";
Expand Down Expand Up @@ -102,7 +106,9 @@
print "identifying CITS ...\n" if $verbose;
my $multTestFlag = $multiTestCorrection ? '--multi-test' : '';

$cmd = "perl $cmdDir/tag2peak.pl $bigFlag $verboseFlag $keepCacheFlag -c $cache/tag2peak_cache -ss --prefix $prefix -gap $maxGap -p $pvalueThreshold $multTestFlag --gene $tagClusterCleanBedFile $uniqTagTruncBedFile $outCITSBedFile";
my $maxPHFlag = $maxN > 0 ? "--maxPH $maxN" : "";

$cmd = "perl $cmdDir/tag2peak.pl $bigFlag $verboseFlag $keepCacheFlag -c $cache/tag2peak_cache -ss --prefix $prefix $maxPHFlag -gap $maxGap -p $pvalueThreshold $multTestFlag --gene $tagClusterCleanBedFile $uniqTagTruncBedFile $outCITSBedFile";
print $cmd, "\n" if $verbose;

$ret = system($cmd);
Expand Down

0 comments on commit 4ff5243

Please sign in to comment.