Skip to content

Commit

Permalink
create output dir after running initial sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinmdouglas committed Dec 19, 2019
1 parent df2cfd4 commit fd94144
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions picrust2/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,6 @@ def full_pipeline(study_fasta,
Descriptions of all of these input arguments/options are given in the
picrust2_pipeline.py script.'''

if path.exists(output_folder):
sys.exit("Stopping since output directory " + output_folder +
" already exists.")

# Make output folder.
make_output_dir(output_folder)

# Throw warning if --per_sequence_contrib set but --stratified unset.
if per_sequence_contrib and not stratified:
print("\nThe option --per_sequence_contrib was set, but not the option "
Expand Down Expand Up @@ -124,6 +117,13 @@ def full_pipeline(study_fasta,
# Check that sequence names in FASTA overlap with input table.
check_overlapping_seqs(study_fasta, input_table, verbose)

if path.exists(output_folder):
sys.exit("Stopping since output directory " + output_folder +
" already exists.")

# Make output folder.
make_output_dir(output_folder)

if verbose:
print("Placing sequences onto reference tree", file=sys.stderr)

Expand Down

0 comments on commit fd94144

Please sign in to comment.