diff --git a/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/db/CURRENT b/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/db/CURRENT new file mode 100644 index 0000000000000000000000000000000000000000..1a84852211ef37da31d6906c4e1784f38d1a63d5 --- /dev/null +++ b/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/db/CURRENT @@ -0,0 +1 @@ +MANIFEST-000002 diff --git a/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/db/LOCK b/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/db/LOCK new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/db/MANIFEST-000002 b/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/db/MANIFEST-000002 new file mode 100644 index 0000000000000000000000000000000000000000..bbbc585686bcbcc33686059c69d80b7b4e1291cd Binary files /dev/null and b/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/db/MANIFEST-000002 differ diff --git a/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/index.curious_bose b/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/index.curious_bose new file mode 100644 index 0000000000000000000000000000000000000000..8c72049dfdc87edc90c895e431634b262f95cc78 Binary files /dev/null and b/src/primingprob/bin/.nextflow/cache/7a063d50-5a1e-4286-aa35-9883474713bf/index.curious_bose differ diff --git a/src/primingprob/bin/.nextflow/history b/src/primingprob/bin/.nextflow/history new file mode 100644 index 0000000000000000000000000000000000000000..dfc43c6b3f3a738ed450452e62b8760532482078 --- /dev/null +++ b/src/primingprob/bin/.nextflow/history @@ -0,0 +1 @@ +2021-12-30 14:13:27 4.4s curious_bose ERR 0451f3cb7c837de5727f9314aa3308b7 7a063d50-5a1e-4286-aa35-9883474713bf nextflow run RIblast_process4.nf diff --git a/src/primingprob/bin/cli_priming_prob.py b/src/primingprob/bin/cli_priming_prob.py new file mode 100644 index 0000000000000000000000000000000000000000..198235f70c61d2a181fc2c2c76b465a7f539464c --- /dev/null +++ b/src/primingprob/bin/cli_priming_prob.py @@ -0,0 +1,63 @@ +"""Command-line interface client.""" +import argparse +import os +from pathlib import Path +import sys +from src.primingprob.priming_prob import Probability as Pbt # type: ignore + + +def parse_args(): + """Parse CLI arguments. + + Returns: + Parsed CLI arguments. + """ + parser = argparse.ArgumentParser( + description="RIblast input", + add_help=False, + formatter_class=argparse.ArgumentDefaultsHelpFormatter, + ) + + parser.add_argument( + 'input_file', + type=lambda p: Path(p).absolute(), + metavar="PATH", + help="path to energy-file", + ) + + parser.add_argument( + 'fasta_file', + type=lambda p: Path(p).absolute(), + metavar="PATH", + help="path to fasta-file", + ) + + parser.add_argument( + 'output_file', + type=lambda p: Path(p).absolute(), + metavar="PATH", + help="path to output-file", + ) + + return parser.parse_args() + + +def main(): + """Start priming_prob.py.""" + args = parse_args() + + if os.path.exists(args.input_file) and os.path.exists(args.fasta_file): # pragma: no cover + paradata = Pbt.inter_para(args.input_file) + Pbt.inter_prob(paradata, args.fasta_file, args.output_file) + + if not os.path.exists(args.input_file) and os.path.exists(args.fasta_file): # pragma: no cover + sys.exit("Path to input-file does not exist") + + +def init(): + """Entry point for CLI executable.""" + if __name__ == '__main__': + main() + + +init() diff --git a/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.begin b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.begin new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.err b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.err new file mode 100644 index 0000000000000000000000000000000000000000..49b6c12be2e5bb6905723c6f7d5cee1fafefd42f --- /dev/null +++ b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.err @@ -0,0 +1 @@ +/Users/kegany44/Master/PythonCourse/Issue_4/scrna-seq-simulation/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.sh: line 2: RIblast: command not found diff --git a/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.out b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.out new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.run b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.run new file mode 100644 index 0000000000000000000000000000000000000000..f21b88e3b58eb45e2b007aa5c9d654a93126d38b --- /dev/null +++ b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.run @@ -0,0 +1,108 @@ +#!/bin/bash +# NEXTFLOW TASK: RIblast_interaction +set -e +set -u +NXF_DEBUG=${NXF_DEBUG:=0}; [[ $NXF_DEBUG > 1 ]] && set -x +NXF_ENTRY=${1:-nxf_main} + + +nxf_date() { + local ts=$(date +%s%3N); + if [[ ${#ts} == 10 ]]; then echo ${ts}000 + elif [[ $ts == *%3N ]]; then echo ${ts/\%3N/000} + elif [[ $ts == *3N ]]; then echo ${ts/3N/000} + elif [[ ${#ts} == 13 ]]; then echo $ts + else echo "Unexpected timestamp value: $ts"; exit 1 + fi +} + +nxf_env() { + echo '============= task environment =============' + env | sort | sed "s/\(.*\)AWS\(.*\)=\(.\{6\}\).*/\1AWS\2=\3xxxxxxxxxxxxx/" + echo '============= task output ==================' +} + +nxf_kill() { + declare -a children + while read P PP;do + children[$PP]+=" $P" + done < <(ps -e -o pid= -o ppid=) + + kill_all() { + [[ $1 != $$ ]] && kill $1 2>/dev/null || true + for i in ${children[$1]:=}; do kill_all $i; done + } + + kill_all $1 +} + +nxf_mktemp() { + local base=${1:-/tmp} + if [[ $(uname) = Darwin ]]; then mktemp -d $base/nxf.XXXXXXXXXX + else TMPDIR="$base" mktemp -d -t nxf.XXXXXXXXXX + fi +} + +on_exit() { + exit_status=${nxf_main_ret:=$?} + printf $exit_status > /Users/kegany44/Master/PythonCourse/Issue_4/scrna-seq-simulation/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.exitcode + set +u + [[ "$tee1" ]] && kill $tee1 2>/dev/null + [[ "$tee2" ]] && kill $tee2 2>/dev/null + [[ "$ctmp" ]] && rm -rf $ctmp || true + exit $exit_status +} + +on_term() { + set +e + [[ "$pid" ]] && nxf_kill $pid +} + +nxf_launch() { + /bin/bash -ue /Users/kegany44/Master/PythonCourse/Issue_4/scrna-seq-simulation/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.sh +} + +nxf_stage() { + true + # stage input files + rm -f transcript.fasta + rm -f primer.fasta + ln -s /Users/kegany44/Master/PythonCourse/Issue_4/scrna-seq-simulation/inputs/transcript.fasta transcript.fasta + ln -s /Users/kegany44/Master/PythonCourse/Issue_4/scrna-seq-simulation/inputs/primer.fasta primer.fasta +} + +nxf_unstage() { + true + [[ ${nxf_main_ret:=0} != 0 ]] && return +} + +nxf_main() { + trap on_exit EXIT + trap on_term TERM INT USR2 + trap '' USR1 + + [[ "${NXF_CHDIR:-}" ]] && cd "$NXF_CHDIR" + NXF_SCRATCH='' + [[ $NXF_DEBUG > 0 ]] && nxf_env + touch /Users/kegany44/Master/PythonCourse/Issue_4/scrna-seq-simulation/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.begin + set +u + set -u + [[ $NXF_SCRATCH ]] && echo "nxf-scratch-dir $HOSTNAME:$NXF_SCRATCH" && cd $NXF_SCRATCH + nxf_stage + + set +e + local ctmp=$(set +u; nxf_mktemp /dev/shm 2>/dev/null || nxf_mktemp $TMPDIR) + local cout=$ctmp/.command.out; mkfifo $cout + local cerr=$ctmp/.command.err; mkfifo $cerr + tee .command.out < $cout & + tee1=$! + tee .command.err < $cerr >&2 & + tee2=$! + ( nxf_launch ) >$cout 2>$cerr & + pid=$! + wait $pid || nxf_main_ret=$? + wait $tee1 $tee2 + nxf_unstage +} + +$NXF_ENTRY diff --git a/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.sh b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.sh new file mode 100644 index 0000000000000000000000000000000000000000..ea891004474054be41c30caa711ecb4ebcc689f5 --- /dev/null +++ b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.command.sh @@ -0,0 +1,3 @@ +#!/bin/bash -ue +RIblast db -i transcript.fasta -o test_db +RIblast ris -i primer.fasta -o Energies.txt -d test_db diff --git a/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.exitcode b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.exitcode new file mode 100644 index 0000000000000000000000000000000000000000..405e057083f25e684989f485a916596125fdedc0 --- /dev/null +++ b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/.exitcode @@ -0,0 +1 @@ +127 \ No newline at end of file diff --git a/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/primer.fasta b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/primer.fasta new file mode 120000 index 0000000000000000000000000000000000000000..3c8fce8e9d738518d1bdbdf767f08408d69502a3 --- /dev/null +++ b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/primer.fasta @@ -0,0 +1 @@ +/Users/kegany44/Master/PythonCourse/Issue_4/scrna-seq-simulation/inputs/primer.fasta \ No newline at end of file diff --git a/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/transcript.fasta b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/transcript.fasta new file mode 120000 index 0000000000000000000000000000000000000000..cbf803b84985cbd01c00af435d9865847a68d864 --- /dev/null +++ b/src/primingprob/bin/work/36/e44fcf5a9b873853ca63a43b531eb0/transcript.fasta @@ -0,0 +1 @@ +/Users/kegany44/Master/PythonCourse/Issue_4/scrna-seq-simulation/inputs/transcript.fasta \ No newline at end of file