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 #66

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
15 changes: 2 additions & 13 deletions q2_cutadapt/_trim.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,17 @@
# ----------------------------------------------------------------------------

import os
import subprocess
import pandas as pd

from qiime2.sdk.util import run_commands

from q2_types.per_sample_sequences import (
CasavaOneEightSingleLanePerSampleDirFmt,
SingleLanePerSampleSingleEndFastqDirFmt,
SingleLanePerSamplePairedEndFastqDirFmt,
)


def run_commands(cmds, verbose=True):
print('Running external command line application. This may print '
'messages to stdout and/or stderr.')
print('The commands to be 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:
print('\nCommand:', end=' ')
print(' '.join(cmd), end='\n\n')
subprocess.run(cmd, check=True)


_trim_defaults = {
'cores': 1,
'adapter_f': None,
Expand Down
Loading