Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REF: import run_commands util from framework #176

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions q2_dada2/_denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,14 @@
import pandas as pd
import numpy as np

from qiime2.sdk.util import run_commands

from q2_types.feature_data import DNAIterator
from q2_types.per_sample_sequences import (
SingleLanePerSampleSingleEndFastqDirFmt,
SingleLanePerSamplePairedEndFastqDirFmt)


def run_commands(cmds, verbose=True):
if verbose:
print("Running external command line application(s). This may print "
"messages to stdout and/or stderr.")
print("The command(s) being run are below. These commands cannot "
"be manually re-run as they will depend on temporary files that "
"no longer exist.")
for cmd in cmds:
if verbose:
print("\nCommand:", end=' ')
print(" ".join(cmd), end='\n\n')
subprocess.run(cmd, check=True)


def _check_featureless_table(fp):
with open(fp) as fh:
# There is a comment line and a header before the feature data
Expand Down
Loading