Skip to content

Commit

Permalink
make lessInfo=1 default (no toy example output)
Browse files Browse the repository at this point in the history
make species.txt a parameter rather than a fixed input file name
  • Loading branch information
MarioStanke committed Apr 5, 2019
1 parent 04adbc6 commit 654e083
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Implementation/src/ParameterHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ ParameterHandler::ParameterHandler() {
// dieList = 1; // 1== uses "Dielist.txt", 0 == uses "Runlist.txt
// INITPARAM(dieList, "1== uses \"Dielist.txt\", 0 == uses \"Runlist.txt\"");

lessInfo = 0; // 1 == Toy prints less info
lessInfo = 1; // 1 == Toy prints less info
INITPARAM(lessInfo,
parameterCategories[SIMULATION],
"if set to 1, Simulator prints less info. Only Relevant for simulation.",true);
Expand Down
31 changes: 18 additions & 13 deletions runVARUS.pl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
my $timeStamp = 1;
my $displayRunListOutput = 1;
my $displaySTARIndexerOutput = 1;
my $readFromTable = 1;
my $readFromTable = "1";

my $latinSpecies ="";
my $latinGenus ="";
Expand All @@ -70,6 +70,8 @@
my $VARUScall = "./VARUS";
my $aligner = "STAR";

my $gtblfile = "species.txt";

my $usage =
"Usage:
Parameter default Explanation
Expand All @@ -94,14 +96,15 @@
--createStatistics 0 creates a plot of the coverage achieved with all downloads
--readFromTable 1 searches for a file 'species.txt' with two columns ;-separated
first column=species name in latin
second column=path to the corresponding genome in fasta-format
--pathToSpecies /cwd/ path to the file 'species.txt'
--readFromTable fname searches for a file fname (default: '$gtblfile') with two columns separated by tab or semicolon
first column: binomial species name in (Latin name, separated by a single space)
second column: path to the corresponding genome FASTA file
--pathToSpecies /cwd/ path to the file '$gtblfile'
--latinGenus latin name of the genus e.g Drosophila
--latinSpecies latin name of the species e.g melanogaster
--latinGenus latin name of the genus e.g. Drosophila
--latinSpecies latin name of the species e.g. melanogaster
--speciesGenome path to the corresponding genome in fasta-format
Expand All @@ -122,7 +125,7 @@
'runThreadN=i'=>\$runThreadN,
'createRunList!'=>\$createRunList,
'allRuns!'=>\$allRuns,
'readFromTable=i'=>\$readFromTable,
'readFromTable=s'=>\$readFromTable,
'latinGenus=s'=>\$latinGenus,
'latinSpecies=s'=>\$latinSpecies,
'speciesGenome=s'=>\$speciesGenome,
Expand Down Expand Up @@ -202,16 +205,18 @@ sub getLoggingTime {


my %genome;
if ($readFromTable != 0){
Log(0, "Reading in species from $pathToSpecies/species.txt...");
if ($readFromTable ne "0"){
$gtblfile = $readFromTable if ($readFromTable ne "1");
my $gtblpath = "$pathToSpecies/$gtblfile";
Log(0, "Reading in species from $gtblpath ...");

open(DAT,"$pathToSpecies/species.txt") || die Log(0, "Could not open file $pathToSpecies/species.txt \n");
open(DAT,"$gtblpath") || die Log(0, "Could not open file $gtblpath\n");
my @line;

while(<DAT>){
my $first = substr $_, 0, 1;
if ($first ne '#'){
@line = split(/;/,$_);
@line = split(/[;\t]/,$_);
my $speciesname = $line[0];
my $genomefname = $line[1];
$genomefname =~ s/^\s+|\s+$//g;
Expand All @@ -220,7 +225,7 @@ sub getLoggingTime {
Log(5, "Found species $speciesname with genome $genomefname");
}
else {
Log(5, "Reading comment from species.txt");
Log(5, "Reading comment from $gtblfile");
}
}
close DAT;
Expand Down

0 comments on commit 654e083

Please sign in to comment.