Skip to content

Commit 2d89605

Browse files
committed
update tbpipeline
1 parent 238460f commit 2d89605

File tree

3 files changed

+32
-5
lines changed

3 files changed

+32
-5
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ To remove TOP you must run <code>TOP.sh --uninstall</code>
8080
* Running TB-pipeline from trimmed fastq
8181

8282
## Under the hood
83-
TOP is a Nextflow-based modular pipeline that used docker to isolate and run the different tools included in the analysis. The main TOP.sh is just a wrapper for the nextflow script (TOP.nf), with augmented functionalities such us update, and arguments passed to the nextflow script. The highly modular nature of TOP makes it easy to quickly add new analysis. You just need to add a process in the TOP.nf, include it in the workflow section of the TOP.nf and implement the parsing of the results into the output. The most straight forward to do it is by implementing it in the Summarizer.R script inside the Spades' docker image.
83+
TOP is a modular Nextflow-based pipeline that use docker to isolate and run the different tools included in the analysis. The main TOP.sh is just a wrapper for the nextflow script (TOP.nf), with augmented functionalities such us update, uninsall and some arguments to be passed to the nextflow script. The highly modular nature of TOP makes it easy to quickly add new analysis. If you want to do it, you just need create or reuse a docker image with your tool of interest and to add a new process in the TOP.nf. Then, you call the process in the workflow section of the TOP.nf and implement the parsing of the resulting files into the output. The most straight forward to do it is by implementing it in the Summarizer.R script inside the Spades' docker image. After doing it, you can just

TBpipeline/Scripts/TBCleaner.R

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,9 @@ mykrobe$sample<-gsub("_.*","", mykrobe$sample)
5151

5252
samples<-merge(samples.df, mykrobe, by.x = "samples", by.y = "sample")
5353
samples$Excluded<-"YES"
54-
if(length(which(samples$mash=="MTBC"))>0){
55-
samples$Excluded[which(samples$mash=="MTBC")]<-"NO"
54+
55+
if(length(which(samples$phylo_group=="Mycobacterium_tuberculosis_complex"))>0){
56+
samples$Excluded[which(samples$phylo_group=="Mycobacterium_tuberculosis_complex")]<-"NO"
5657
}
5758

5859
to.remove<-samples$dirs[which(samples$Excluded=="YES")]

TOP.sh

+28-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
source activate top_nf
4-
SHORT=u,r:,f:,h,t:,c:,d,s:,u
4+
SHORT=u,r:,f:,h,t:,c:,d,s:,x
55
LONG=update,reads:,fastas:,help,tbdb:,cores:,dev,sp:,uninstall
66
OPTS=$(getopt --options $SHORT --longoptions $LONG -- "$@")
77

@@ -29,7 +29,7 @@ do
2929
READS="$2"
3030
shift 2
3131
;;
32-
-u | --uninstall )
32+
-x | --uninstall )
3333
echo "Removing TOP"
3434
rm ${TOPSHPATH}/TOP.sh
3535
conda deactivate top_nf
@@ -40,6 +40,29 @@ do
4040
echo "Running from fastas is not implemented yet"
4141
exit 2
4242
;;
43+
-u | --update )
44+
echo "Updating The One Pipeline"
45+
wget -O ${CONDA_PREFIX}/bin/TOP.nf https://github.com/garcia-nacho/TOP/raw/master/TOP.nf
46+
wget -O ${CONDA_PREFIX}/bin/nextflow.config https://github.com/garcia-nacho/TOP/raw/master/nextflow.config
47+
wget -O ${CONDA_PREFIX}/top_template.html https://github.com/garcia-nacho/TOP/raw/master/top_template.html
48+
wget -O ${CONDA_PREFIX}/bin/TOP.sh https://github.com/garcia-nacho/TOP/raw/master/TOP.sh
49+
50+
docker pull ghcr.io/garcia-nacho/top_spades
51+
docker pull ghcr.io/garcia-nacho/top_abricate
52+
docker pull ghcr.io/garcia-nacho/top_emmtyper
53+
docker pull ghcr.io/garcia-nacho/top_hicap
54+
docker pull ghcr.io/garcia-nacho/top_seroba
55+
docker pull ghcr.io/garcia-nacho/top_virfinder
56+
#docker pull ghcr.io/garcia-nacho/top_prokka
57+
docker pull ghcr.io/garcia-nacho/top_ngstar
58+
docker pull ghcr.io/garcia-nacho/top_tbpipeline
59+
docker pull ghcr.io/garcia-nacho/top_seqsero
60+
docker pull ghcr.io/garcia-nacho/top_ngmaster
61+
docker pull ghcr.io/garcia-nacho/top_ecoli
62+
docker pull ghcr.io/garcia-nacho/top_meningotype
63+
docker pull ghcr.io/garcia-nacho/top_tartrate
64+
exit 2
65+
;;
4366
-d | --dev )
4467
devmode=1
4568
shift
@@ -54,6 +77,8 @@ do
5477
echo "use -f or --fastas to run from a set of fastas e.g. TOP.sh -f /path/to/fastas"
5578
echo "use -d or --dev to run in development mode.(i.e all files are saved after a successful run)"
5679
echo "use -h or --help to show this help"
80+
echo "use -u or --update to update the pipeline"
81+
echo "use -x or --uninstall to uninstall the pipeline"
5782
echo ""
5883
exit 2
5984
;;
@@ -63,6 +88,7 @@ do
6388
;;
6489
*)
6590
echo "Unexpected option: $1"
91+
exit 2
6692
;;
6793
esac
6894
done

0 commit comments

Comments
 (0)