Skip to content

Commit

Permalink
modify input tests - enable running on a cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
tdelhomme committed Nov 18, 2015
1 parent 883afa3 commit 0909aa6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions needlestack.nf
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ assert params.all_SNVs in [true,false] : "do not assign a value to --all_SNVs"
assert params.no_plots in [true,false] : "do not assign a value to --no_plots"
assert params.no_indels in [true,false] : "do not assign a value to --no_indels"
assert params.use_file_name in [true,false] : "do not assign a value to --use_file_name"
assert fasta_ref.exists() : "input fasta reference does not exist"
assert fasta_ref_fai.exists() : "input fasta reference does not seem to have a .fai index (use samtools faidx)"
assert bed.exists() : "input bed file does not exist"
assert file(params.bam_folder).exists() : "input bam folder does not exist"
try { assert fasta_ref.exists() : "\n WARNING : fasta reference not located in execution directory. Make sure reference index is in the same folder as fasta reference" } catch (AssertionError e) { println e.getMessage() }
if (fasta_ref.exists()) {assert fasta_ref_fai.exists() : "input fasta reference does not seem to have a .fai index (use samtools faidx)"}
try { assert bed.exists() : "\n WARNING : bed file not located in execution directory" } catch (AssertionError e) { println e.getMessage() }
try { assert file(params.bam_folder).exists() : "\n WARNING : input BAM folder not located in execution directory" } catch (AssertionError e) { println e.getMessage() }
assert (params.min_dp > 0) : "minimum coverage must be higher than 0 (--min_dp)"
assert (params.max_DP > 1) : "maximum coverage before downsampling must be higher than 1 (--max_DP)"
assert (params.min_ao > 0) : "minimum alternative reads must be higher than 0 (--min_ao)"
Expand All @@ -122,6 +122,7 @@ if(params.use_file_name == true){

/* Software information */

log.info ''
log.info '--------------------------------------------------'
log.info 'NEEDLESTACK: A MULTI-SAMPLE SOMATIC VARIANT CALLER'
log.info '--------------------------------------------------'
Expand Down

2 comments on commit 0909aa6

@tdelhomme
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes #42

@mfoll
Copy link
Member

@mfoll mfoll commented on 0909aa6 Nov 18, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

Please sign in to comment.