Skip to content

Commit

Permalink
Merge pull request #15 from HarryHung/wget
Browse files Browse the repository at this point in the history
Change from curl to wget

Former-commit-id: 27d4641
  • Loading branch information
HarryHung authored Jan 6, 2023
2 parents 13e79ca + 7b556ed commit a847908
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 30 deletions.
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ GPS Unified Pipeline is a Nextflow Pipeline for processing Streptococcus pneumon
- [Docker](https://www.docker.com/)
- Java 11+ ([OpenJDK](https://openjdk.org/)/[Oracle Java](https://www.oracle.com/java/))
### Setup
1. Download and unzip the repository: https://github.com/HarryHung/gps-unified-pipeline/archive/refs/heads/master.zip

or

Clone the repository (if Git is installed on your system)
1. Clone the repository (if Git is installed on your system)
```
git clone https://github.com/HarryHung/gps-unified-pipeline.git
```
or

Download and unzip the [repository](https://github.com/HarryHung/gps-unified-pipeline/archive/refs/heads/master.zip)
2. Go into the local copy of the repository
```
cd gps-unified-pipeline
Expand All @@ -32,7 +31,7 @@ GPS Unified Pipeline is a Nextflow Pipeline for processing Streptococcus pneumon
```
./nextflow run main.nf
```
- You can also specific the location of the raw reads by adding option `--reads`
- You can also specify the location of the raw reads by adding the option `--reads`
```
./nextflow run main.nf --reads /path/to/raw-reads-directory
```
Expand All @@ -44,8 +43,8 @@ GPS Unified Pipeline is a Nextflow Pipeline for processing Streptococcus pneumon
- `17175_7#59` and `21127_1#156` should pass Overall QC, therefore with analysis results

### Output
- By default, the pipeline outputs the results into `output` directory inside the `gps-unified-pipeline` local repository
- It can be changed by adding option `--output`
- By default, the pipeline outputs the results into the `output` directory inside the `gps-unified-pipeline` local repository
- It can be changed by adding the option `--output`
```
./nextflow run main.nf --output /path/to/output-directory
```
Expand All @@ -56,30 +55,30 @@ GPS Unified Pipeline is a Nextflow Pipeline for processing Streptococcus pneumon
| summary.csv | This file contains all the information generated by the pipeline on each sample |

### Options
- The table below contains the avilable options that can be used when you run the pipeline
- The table below contains the available options that can be used when you run the pipeline
- Usage:
```
./nextflow run main.nf --[option name] [value]
```
- `$projectDir` is the directory where the `gps-unified-pipeline` local repository is stored
- Must not have trailing slash ("`/`" at the end of path) on all paths
- Must not have a trailing slash ("`/`" at the end of the path) on all paths
| Option | Default | Possible Values | Description |
| --- | ---| --- | --- |
| `reads` | `"$projectDir/input"` | Any valid path | Path to the input directory that contains the reads to be processed |
| `output` | `"$projectDir/output"` | Any valid path | Path to the output directory that save the results |
| `assembler`| `"shovill"` | `"shovill"` or `"unicycler"` | SPAdes Assembler to assembly the reads |
| `seroba_remote` | [SeroBA GitHub Repo](https://github.com/sanger-pathogens/seroba.git) | Any valid URL to a git remote repository | URL to a SeroBA git remote repository |
| `seroba_local` | `"$projectDir/bin/seroba"` | Any valid path | Path to the directory where SeroBA local repository can be found or cloned to |
| `seroba_local` | `"$projectDir/bin/seroba"` | Any valid path | Path to the directory where SeroBA local repository should be saved to |
| `kraken2_db_remote` | [Kraken 2 RefSeq Index Standard-8 (2022-09-12)](https://genome-idx.s3.amazonaws.com/kraken/k2_standard_08gb_20220926.tar.gz) | Any valid URL to a Kraken2 database in `.tar.gz` format | URL to a Kraken2 database |
| `kraken2_db_local` | `"$projectDir/bin/kraken"` | Any valid path | Path to the directory where a Kraken2 database can be found or download to |
| `kraken2_memory_mapping` | `true` | `true` or `false` | Using memory mapping option of Kraken2 or not. `true` means not loading the database into RAM, suitable for memory-limited or fast storage (e.g. SSD) environments |
| `kraken2_db_local` | `"$projectDir/bin/kraken"` | Any valid path | Path to the directory where the remote Kraken2 database should be saved to |
| `kraken2_memory_mapping` | `true` | `true` or `false` | Using the memory mapping option of Kraken2 or not. `true` means not loading the database into RAM, suitable for memory-limited or fast storage (e.g. SSD) environments |
| `ref_genome` | `"$projectDir/data/Streptococcus_pneumoniae_ATCC_700669_v1.fa"` | Any valid path to a `.fa` or `.fasta` file | Path to the reference genome for mapping |
| `ref_genome_bwa_db_local` | `"$projectDir/bin/bwa_ref_db"` | Any valid path | Path to the directory where the reference genome FM-index database for BWA is stored |
| `poppunk_db_remote` | [GPS v6](https://gps-project.cog.sanger.ac.uk/GPS_v6.tar.gz) | Any valid URL to a PopPUNK database in `.tar.gz` format | URL to a PopPUNK database |
| `poppunk_ext_clusters_remote` | [GPS v6 GPSC Designation](https://www.pneumogen.net/gps/GPS_v6_external_clusters.csv) | Any valid URL to a PopPUNK external clusters file in `.csv` format | URL to a PopPUNK external clusters file |
| `poppunk_db_local` | `"$projectDir/bin/poppunk"` | Any valid path | Path to the directory where a PopPUNK database and external clusters file can be found or download to |
| `ref_genome_bwa_db_local` | `"$projectDir/bin/bwa_ref_db"` | Any valid path | Path to the directory where the reference genome FM-index database for BWA should be saved to |
| `poppunk_db_remote` | [GPS v6](https://gps-project.cog.sanger.ac.uk/GPS_v6.tar.gz) | Any valid URL to a PopPUNK database in `.tar.gz` format | URL to a PopPUNK database |
| `poppunk_ext_clusters_remote` | [GPS v6 GPSC Designation](https://www.pneumogen.net/gps/GPS_v6_external_clusters.csv) | Any valid URL to a PopPUNK external clusters file in `.csv` format | URL to a PopPUNK external clusters file |
| `poppunk_db_local` | `"$projectDir/bin/poppunk"` | Any valid path | Path to the directory where the remote PopPUNK database and external clusters file should be saved to |

 
## Credits
- `LINEAGE` process in `lineage.nf` module is adapted from [`GPSC_pipeline_nf`](https://github.com/sanger-bentley-group/GPSC_pipeline_nf) by [@blue-moon22](https://github.com/blue-moon22)
- `HET_SNP_COUNT` process in `mapping.nf` module is adapted from [`mecA-HetSites-calculator`](https://github.com/kumarnaren/mecA-HetSites-calculator) by [@kumarnaren](https://github.com/kumarnaren)
- `LINEAGE` process in the `lineage.nf` module is adapted from [`GPSC_pipeline_nf`](https://github.com/sanger-bentley-group/GPSC_pipeline_nf) by [@blue-moon22](https://github.com/blue-moon22)
- `HET_SNP_COUNT` process in the `mapping.nf` module is adapted from [`mecA-HetSites-calculator`](https://github.com/kumarnaren/mecA-HetSites-calculator) by [@kumarnaren](https://github.com/kumarnaren)
4 changes: 2 additions & 2 deletions modules/lineage.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ process GET_POPPUNK_DB {
rm -rf !{local}/$DB_NAME
mkdir -p !{local}
curl -kL !{db_remote} > poppunk_db.tar.gz
wget !{db_remote} -O poppunk_db.tar.gz
tar -xzf poppunk_db.tar.gz -C !{local}
rm poppunk_db.tar.gz
Expand Down Expand Up @@ -47,7 +47,7 @@ process GET_POPPUNK_EXT_CLUSTERS {
rm -f !{local}/$EXT_CLUSTERS_FILE
mkdir -p !{local}
curl -kL !{ext_clusters_remote} > !{local}/$EXT_CLUSTERS_FILE
wget !{ext_clusters_remote} -O !{local}/$EXT_CLUSTERS_FILE
touch !{local}/done_$EXT_CLUSTERS_FILE
fi
Expand Down
2 changes: 1 addition & 1 deletion modules/taxonomy.nf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ process GET_KRAKEN_DB {
rm -rf !{local}
mkdir -p !{local}
curl -kL !{remote} > kraken_db.tar.gz
wget !{remote} -O kraken_db.tar.gz
tar -xzf kraken_db.tar.gz -C !{local}
rm -f kraken_db.tar.gz
Expand Down
16 changes: 8 additions & 8 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ process {
container = 'staphb/fastp:0.23.2'
}
withName:GET_BASES {
container = 'cfmanteiga/alpine-bash-curl-jq:latest'
container = 'wbitt/network-multitool:latest'
}
withName:ASSEMBLY_SHOVILL {
container = 'staphb/shovill:1.1.0-2022Dec'
Expand All @@ -45,16 +45,16 @@ process {
container = 'staphb/quast:5.0.2'
}
withName:ASSEMBLY_QC {
container = 'frolvlad/alpine-bash:latest'
container = 'wbitt/network-multitool:latest'
}
withName:GET_KRAKEN_DB {
container = 'cfmanteiga/alpine-bash-curl-jq:latest'
container = 'wbitt/network-multitool:latest'
}
withName:TAXONOMY {
container = 'staphb/kraken2:2.1.2-no-db'
}
withName:TAXONOMY_QC {
container = 'frolvlad/alpine-bash:latest'
container = 'wbitt/network-multitool:latest'
}
withName:GET_REF_GENOME_BWA_DB_PREFIX {
container = 'staphb/bwa:0.7.17'
Expand All @@ -75,16 +75,16 @@ process {
container = 'python:3.11.1-bullseye'
}
withName:MAPPING_QC {
container = 'frolvlad/alpine-bash:latest'
container = 'wbitt/network-multitool:latest'
}
withName:OVERALL_QC {
container = 'frolvlad/alpine-bash:latest'
container = 'wbitt/network-multitool:latest'
}
withName:GET_POPPUNK_DB {
container = 'cfmanteiga/alpine-bash-curl-jq:latest'
container = 'wbitt/network-multitool:latest'
}
withName:GET_POPPUNK_EXT_CLUSTERS {
container = 'cfmanteiga/alpine-bash-curl-jq:latest'
container = 'wbitt/network-multitool:latest'
}
withName:LINEAGE {
container = 'staphb/poppunk:2.5.0'
Expand Down

0 comments on commit a847908

Please sign in to comment.