Skip to content

Commit

Permalink
update ncov_tools to work with results at differing levels within the…
Browse files Browse the repository at this point in the history
… filesystem
  • Loading branch information
jaleezyy committed Jun 28, 2024
1 parent 7121b11 commit f2e1834
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/ncov-tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def move(cwd, dest, prefix):
#print("Don't forget to update the config.yaml file as needed prior to running ncov-tools.")
print("Running ncov-tools using %s cores!" %(snakemake.threads))

subprocess.run([run_script, '-c', str(snakemake.threads), '-s', str(result_dir)])
subprocess.run([run_script, '-c', str(snakemake.threads), '-s', str(result_dir), '-n', os.path.join(exec_dir, 'ncov-tools')])

# clean up
shutil.rmtree(data_root)
Expand Down
12 changes: 10 additions & 2 deletions scripts/run_ncov_tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ shopt -s extglob

CORES=1
SIGNAL=0
NCOV=0

HELP="""
This script attempts to execute ncov-tools for postprocessing of SIGNAL sequencing data.
Expand All @@ -22,10 +23,11 @@ Second argument is '-s' for SIGNAL results directory (namely the name) - much of
"""

while getopts ":c:s:" option; do
while getopts ":c:s:n:" option; do
case "${option}" in
c) CORES=$OPTARG;; # number of cores
s) SIGNAL=$OPTARG;; # SIGNAL results directory
n) NCOV=$OPTARG;; # ncov-tools directory
esac
done

Expand All @@ -40,12 +42,18 @@ if [ $SIGNAL = 0 ] ; then
exit 1
fi

if [ $SIGNAL = 0 ]; then
echo "You must specify the path where ncov-tools can be found."
echo "$HELP"
exit 1
fi

# Start point for executing from ncov-tools.py is SIGNAL results directory
RESULTS=$PWD

# determine where ncov-tools is located *add check*
# change directory to ncov-tools
cd ../ncov-tools
cd $NCOV

# run ncov-tools
snakemake -k -s workflow/Snakefile --cores ${CORES} all
Expand Down
2 changes: 1 addition & 1 deletion scripts/signal_postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

assert long_git_id.startswith('$Id: ')
#short_git_id = long_git_id[5:12]
short_git_id = "v1.6.5"
short_git_id = "v1.6.6"

# Suppresses matplotlib warning (https://github.com/jaleezyy/covid-19-signal/issues/59)
# Creates a small memory leak, but it's nontrivial to fix, and won't be a practical concern!
Expand Down
2 changes: 1 addition & 1 deletion signalexe.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ def install_signal(frontend, data='data', unlock=False):
# note: add root_dir to determine the root directory of SIGNAL
script_path = os.path.join(os.path.abspath(sys.argv[0]).rsplit("/",1)[0])
args, allowed = create_parser()
version = 'v1.6.5'
version = 'v1.6.6'
alt_options = []

if args.version:
Expand Down

0 comments on commit f2e1834

Please sign in to comment.