Skip to content

Commit b123966

Browse files
committed
Added helper commands
1 parent cb9a7f7 commit b123966

File tree

7 files changed

+73
-12
lines changed

7 files changed

+73
-12
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
**/__pycache__
88

99
# Files to ignore
10+
found*.sh
1011
docs/overview.pdf
1112
.nextflow.log*
1213
.nextflow.pid

cut_tag_trial/cleanup_work.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rm -rf ./work/53/47afd96a82ddcdccd62a89fe56ac8c

cut_tag_trial/conf/experiment.config

+17-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,29 @@
11

22

33
params {
4-
data_remote = "cut_tag_trial"
5-
experiment = "cut_tag_trial"
4+
// TODO: Add back code to pull data
5+
//data_remote = "cut_tag_trial"
6+
//experiment = "cut_tag_trial"
67

7-
run_get_dropbox_data = false
8-
run_fastqc = false
9-
run_trim_galore = false
108

11-
run_cut_and_tag = true
9+
save_reference = true
10+
save_chromsize = true //Save
11+
save_trimmed = true //Save fastq.gz after trimming
1212

13+
// Alignment
14+
save_unaligned = true // Save fastq.gz before alignment
15+
save_align_target = true
16+
save_align_spikein = true
1317

14-
fastq_paired = "${launchDir}/data/fastq/*_R{1,2}.fastq.gz"
1518

19+
// Deduplication
20+
dedup_target_reads = true
21+
save_markdup_bam = true
22+
save_dedup_bam = true
23+
1624

17-
genome = 'WBcel235'
25+
//genome = 'WBcel235'
1826
//genome = 'ce10'
1927
sample_sheet = "${launchDir}/conf/samplesheet.csv"
2028

21-
}
29+
}

cut_tag_trial/nf-core/search.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/bin/bash
2-
SEARCH="BOWTIE2_TARGET"
3-
rm found*.sh
2+
SEARCH="$1"
3+
echo ${SEARCH}
4+
rm -f found*.sh
45
count=1
56
for d in `find ./work -name .command.sh`;
67
do

cut_tag_trial/run.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/bin/bash
2-
nextflow -c conf/experiment.config run ../../Cut-and-Tag-Nextflow -resume -bg -with-tower -N [email protected]
2+
#nextflow -c conf/experiment.config run ../../Cut-and-Tag-Nextflow --save_reference true -resume -bg -with-tower -N [email protected]
3+
nextflow -c conf/experiment.config run ../../Cut-and-Tag-Nextflow -resume -bg -with-tower -N [email protected]

cut_tag_trial/run_singularity.sh

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
COMMAND=$1
3+
SINGULARITY_HOME=/home/daniel.higgins-umw/.singularity
4+
CONTAINER=danhumassmed-picard-trimmomatic-1.0.1.img
5+
singularity exec ${SINGULARITY_HOME}/${CONTAINER} ${COMMAND}

cut_tag_trial/search_command.sh

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
# CHECK COMMANDLINE PARAMS
4+
if [ -n "$1" ]; then
5+
SEARCH="$1"
6+
else
7+
echo "Search criteria is required"
8+
exit 1
9+
fi
10+
11+
if [ -n "$2" ]; then
12+
echo "Setting file name to .command.run"
13+
FILE_NM=".command.run"
14+
else
15+
echo "Setting file name to .command.sh"
16+
FILE_NM=".command.sh"
17+
fi
18+
19+
if [ "$FILE_NM" = ".command.run" ]; then
20+
SEARCH="^# NEXTFLOW TASK:.*${SEARCH}"
21+
fi
22+
23+
# SETUP RUN
24+
rm -f found*.txt
25+
rm -f cleanup_work.sh
26+
touch cleanup_work.sh
27+
chmod +x cleanup_work.sh
28+
29+
count=1
30+
for d in `find ./work -name ${FILE_NM}`;
31+
do
32+
found=`cat $d|grep "${SEARCH}"`;
33+
if [ -n "$found" ];
34+
then
35+
echo $d;
36+
echo $found;
37+
echo "rm -rf `dirname $d`" >>cleanup_work.sh
38+
cat $d > found${count}.sh;
39+
line_to_insert="# cd `dirname $d`"
40+
sed -i "2i\\$line_to_insert" found${count}.sh
41+
count=$((count + 1))
42+
fi
43+
done
44+

0 commit comments

Comments
 (0)