Skip to content

Commit

Permalink
added documentation to script
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagofilipe12 committed Feb 5, 2018
1 parent 90c4411 commit 3058a16
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 34 deletions.
48 changes: 28 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,34 @@ It will output a `JSON` file that can be imported into [pATLAS](http://www.patla
## Usage

```
--threads Number of threads that mash screen will have to run.
Default: 1
--kMer the length of the kmer to be used by mash. Default: 21
--pValue The p-value cutoff. Default: 0.05
--identity The minimum identity value between two sequences. Default: 0.9
--noWinner This option allows to disable the -w option of mash screen
Default: false
--refSketch The file that has the reference mash screen usedby pATLAS
Default: reference/patlas.msh
--reads The path to the read files. Here users may provide many samples in
the same directory. However be assured that glob pattern is unique
(e.g. 'path/to/*_{1,2}.fastq'). Default: reads/*_{1,2}.fastq.gz
--singleEnd Provide this option if you have single-end reads. By default
the pipeline will assume that you provide paired-end reads. Default: false
--help Opens this help. It will open only when --help is provided. So,
yes, this line is pretty useless since you already know that if you
reached here.
Usage:
nextflow run tiagofilipe12/pATLAS_mash_screen.nf
Nextflow magic options:
-profile Forces nextflow to run with docker or singularity. Default: docker Choices: standard, singularity
Main options:
--help Opens this help. It will open only when --help is provided. So, yes, this line is pretty useless since you already know that if you reached here.
--version Prints the version of the pipeline script.
--threads Number of threads that mash screen will have to run. Default: 1
--mash_screen Enables mash screen run.
--assembly Enables mash dist run to use fasta file against plasmid db
--mapping Enables mapping pipeline.
Mash options:
--kMer the length of the kmer to be used by mash. Default: 21
--pValue The p-value cutoff. Default: 0.05
Mash screen exclusive options:
--identity The minimum identity value between two sequences. Default: 0.9
--noWinner This option allows to disable the -w option of mash screen Default: false
Mash dist exclusive options:
--mash_distance Provide the maximum distance between two plasmids to be reported. Default: 0.1
Reads options:
--reads The path to the read files. Here users may provide many samples in the same directory. However be assured that glob pattern is unique (e.g. 'path/to/*_{1,2}.fastq').
--singleEnd Provide this option if you have single-end reads. By default the pipeline will assume that you provide paired-end reads. Default: false
Fasta options:
--fasta Provide fasta file pattern to be searched by nextflow. Default: 'fasta/*.fas'
```

## TODO

* Default inputs for `reads` and `refSketch` are still sketchy and `patlas.msh`
should be downloaded [here](https://github.com/tiagofilipe12/mash_wrapper/releases/download/1.0.5/patlas.msh) for now.
## Example run

`nextflow run tiagofilipe12/pATLAS_auxiliary_scripts --assembly`
5 changes: 3 additions & 2 deletions lib/Helper.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ class Help{
println("===========================================================\n")
println("Usage:")
println(" nextflow run tiagofilipe12/pATLAS_mash_screen.nf\n")
println(" Nextflow magic options:")
println(" -profile Forces nextflow to run with docker or " +
"singularity. Default: docker Choices: standard, singularity")
println(" Main options:")
println(" --help Opens this help. It will open only when --help is " +
"provided. So, yes, this line is pretty useless since you already " +
Expand All @@ -22,8 +25,6 @@ class Help{
println(" Mash options:")
println(" --kMer the length of the kmer to be used by mash. Default: 21")
println(" --pValue The p-value cutoff. Default: 0.05")
println(" --refSketch The file that has the reference mash screen used" +
" by pATLAS Default: reference/patlas.msh")
println(" Mash screen exclusive options:")
println(" --identity The minimum identity value between two sequences." +
" Default: 0.9")
Expand Down
12 changes: 6 additions & 6 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,16 @@ process {

// this should be passed with the -profile mash_screen
profiles {
// standard uses executor local and docker
// // standard uses executor local and docker
standard {
docker.enabled = true
}
singularity {
singularity.enabled = true
process.$mashScreen.container = 'docker://tiagofilipe12/patlas_mash_screen:latest'
process.$mashOutputJson.container = 'docker://tiagofilipe12/patlas_mash_screen:latest'
process.$runMashDist.container = 'docker://tiagofilipe12/patlas_mash_screen:latest'
process.$mashDistOutputJson.container = 'docker://tiagofilipe12/patlas_mash_screen:latest'
// process.$mashScreen.container = 'docker://tiagofilipe12/patlas_mash_screen:latest'
// process.$mashOutputJson.container = 'docker://tiagofilipe12/patlas_mash_screen:latest'
// process.$runMashDist.container = 'docker://tiagofilipe12/patlas_mash_screen:latest'
// process.$mashDistOutputJson.container = 'docker://tiagofilipe12/patlas_mash_screen:latest'
}
// TODO make a profile for slurm
// // TODO make a profile for slurm
}
7 changes: 1 addition & 6 deletions pATLAS_mash_screen.nf
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (params.help) {
winnerVar = (params.noWinner == false) ? "-w" : ""

// start all optional channels
readInputs = readInputs2 = mashRef = mashRef2 = fastaInputs = Channel.empty()
readInputs = readInputs2 = fastaInputs = Channel.empty()

/**
* The combination of these four channels (two forked) allows to double check for
Expand All @@ -28,9 +28,6 @@ if (params.mash_screen || params.mapping) {
}
if (params.mash_screen || params.assembly) {
refSketch = "/home/data/patlas.msh"
// Channel.fromPath("/home/data/*.msh")
// .ifEmpty { exit 0, "no mash sketch"}
// .into { mashRef; mashRef2 }
}

/**
Expand Down Expand Up @@ -65,7 +62,6 @@ process mashScreen {

input:
set sample, file(reads) from readInputs
// file db from mashRef

output:
file "sortedMashScreenResults_${sample}.txt" into mashScreenResults
Expand Down Expand Up @@ -100,7 +96,6 @@ process runMashDist {

input:
file fasta from fastaInputs
// file db from mashRef2

output:
file "${fasta}_mashdist.txt" into mashDistResults
Expand Down

0 comments on commit 3058a16

Please sign in to comment.