diff --git a/nextflow/amr-on-wb/modules/Microbiome/kraken2.nf b/nextflow/amr-on-wb/modules/Microbiome/kraken2.nf index 3d581c2..e027a2c 100755 --- a/nextflow/amr-on-wb/modules/Microbiome/kraken2.nf +++ b/nextflow/amr-on-wb/modules/Microbiome/kraken2.nf @@ -103,37 +103,3 @@ process runbracken { """ } -process kronadb { - label "microbiome" - output: - file("krona_db/taxonomy.tab") optional true into krona_db_ch // is this a value ch? - - when: - !params.skip_krona - - script: - """ - ktUpdateTaxonomy.sh krona_db - """ -} - -process kronafromkraken { - publishDir params.outdir, mode: 'copy' - label "microbiome" - input: - file(x) from kraken2krona_ch.collect() - //file(y) from kaiju2krona_ch.collect() - file("krona_db/taxonomy.tab") from krona_db_ch - - output: - file("*_taxonomy_krona.html") - - when: - !params.skip_krona - - script: - """ - mkdir -p krona - ktImportTaxonomy -o kraken2_taxonomy_krona.html -tax krona_db $x - """ -} diff --git a/nextflow/amr-on-wb/nextflow.config b/nextflow/amr-on-wb/nextflow.config index b6b36f4..2204da3 100755 --- a/nextflow/amr-on-wb/nextflow.config +++ b/nextflow/amr-on-wb/nextflow.config @@ -86,7 +86,7 @@ profiles { google.region = "${GCS_BUCKET_LOCATION}" google.project = "$GOOGLE_CLOUD_PROJECT" - google.batch.serviceAccountEmail = "$GOOGLE_SERVICE_ACCOUNT_EMAIL" + google.batch.serviceAccountEmail = "pet-277205028424080dda892@vwb-dev-beaming-sprout-9366.iam.gserviceaccount.com" google.batch.bootDiskSize = '50 GB' google.batch.usePrivateAddress = true google.batch.network = "projects/${GOOGLE_CLOUD_PROJECT}/global/networks/default" @@ -102,19 +102,19 @@ profiles { includeConfig "config/google_batch_resources.config" process.executor = 'google-batch' - process.container = "us-central1-docker.pkg.dev/${GOOGLE_CLOUD_PROJECT}/${GOOGLE_ARTIFACT_REPO}/amrplusplus-workbench:latest" + process.container = "us-central1-docker.pkg.dev/vwb-dev-beaming-sprout-9366/nf-containers/amrplusplus-workbench:latest" process.errorStrategy = { task.exitStatus==50001 ? 'retry' : 'terminate' } process.maxRetries = 5 - workDir = "gs://${GCS_BUCKET}/scratch" + workDir = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/scratch" - google.region = "${GCS_BUCKET_LOCATION}" - google.project = "$GOOGLE_CLOUD_PROJECT" - google.batch.serviceAccountEmail = "$GOOGLE_SERVICE_ACCOUNT_EMAIL" + google.region = "us-central1" + google.project = "vwb-dev-beaming-sprout-9366" + google.batch.serviceAccountEmail = "pet-277205028424080dda892@vwb-dev-beaming-sprout-9366.iam.gserviceaccount.com" google.batch.bootDiskSize = '50 GB' google.batch.usePrivateAddress = true - google.batch.network = "projects/${GOOGLE_CLOUD_PROJECT}/global/networks/network" - google.batch.subnetwork = "projects/${GOOGLE_CLOUD_PROJECT}/regions/${GCS_BUCKET_LOCATION}/subnetworks/subnetwork" + google.batch.network = "projects/vwb-dev-beaming-sprout-9366/global/networks/network" + google.batch.subnetwork = "projects/vwb-dev-beaming-sprout-9366/regions/us-central1/subnetworks/subnetwork" google.httpConnectTimeout = '10m' google.httpReadTimeout = '10m' google.batch.maxSpotAttempts = 5 diff --git a/nextflow/amr-on-wb/params_google_batch.config b/nextflow/amr-on-wb/params_google_batch.config index 019a50e..77185e1 100644 --- a/nextflow/amr-on-wb/params_google_batch.config +++ b/nextflow/amr-on-wb/params_google_batch.config @@ -1,20 +1,18 @@ /* * Google Batch Configuration File * This file sets all parameters for running on Google Cloud Batch. - * It uses the 'GCS_BUCKET' environment variable to define paths. - */ - -// Grabs the GCS_BUCKET environment variable. Defaults to 'nf-files' if not set. -def gcs_bucket = System.getenv("GCS_BUCKET") ?: "nf-files" + */ params { /* Display help message */ help = false + pipeline = "fast_AMR" + // ----------------------------------------------------------------- // Input Data // ----------------------------------------------------------------- /* Location of forward and reverse read pairs */ - reads = "gs://${gcs_bucket}/data/raw/*_R{1,2}.fastq.gz" + reads = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/raw/*_R{1,2}.fastq.gz" /* Optional input for bam files for use with "--pipeline bam_resistome" */ bam_files = null @@ -23,23 +21,23 @@ params { // Reference Databases // ----------------------------------------------------------------- /* Location of reference/host genome */ - host = "gs://${gcs_bucket}/data/host/chr21.fasta.gz" + host = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/host/chr21.fasta.gz" /* Host index files created with bwa */ - host_index = "gs://${gcs_bucket}/data/host/chr21.fasta.gz*" + host_index = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/host/chr21.fasta.gz*" /* Location of amr index files with wildcard - set to null to build automatically */ amr_index = null /* Location of antimicrobial resistance (MEGARes) database */ - amr = "gs://${gcs_bucket}/data/amr/megares_database_v3.00.fasta" + amr = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/amr/megares_database_v3.00.fasta" /* Location of amr annotation file */ - annotation = "gs://${gcs_bucket}/data/amr/megares_annotations_v3.00.csv" + annotation = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/amr/megares_annotations_v3.00.csv" - /* Kraken database location */ + /* Kraken database location */ kraken_db = null - + /* Kraken confidence score */ kraken_confidence = 0.0 @@ -47,13 +45,13 @@ params { // Output // ----------------------------------------------------------------- /* Output directory - Saved to Cloud Storage */ - output = "gs://${gcs_bucket}/results/test_results" + output = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/results/test_results" // ----------------------------------------------------------------- // Pipeline Logic & Analysis Toggles // ----------------------------------------------------------------- /* Add SNP analysis */ - snp = "Y" + snp = "N" /* Add deduplicaation analysis */ deduped = "N" @@ -66,7 +64,7 @@ params { // Trimming Parameters (Trimmomatic) // ----------------------------------------------------------------- /* Adapters file location */ - adapters = "gs://${gcs_bucket}/data/adapters/nextera.fa" + adapters = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/adapters/nextera.fa" leading = 3 trailing = 3 @@ -95,7 +93,7 @@ params { // Other Tools // ----------------------------------------------------------------- /* multiQC config folder */ - multiqc = "gs://${gcs_bucket}/data/multiqc" + multiqc = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/multiqc" /* Qiime2 Parameters */ p_trim_left_f = 25 @@ -104,7 +102,7 @@ params { p_trunc_len_r = 220 /* qiime2 bayes classifier */ - dada2_db = "gs://${gcs_bucket}/data/qiime/gg-13-8-99-515-806-nb-classifier.qza" + dada2_db = "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/qiime/gg-13-8-99-515-806-nb-classifier.qza" } // ----------------------------------------------------------------- @@ -124,4 +122,4 @@ env { /* These next tools are optional depending on which analyses you want to run */ KRAKEN2 = "kraken2" QIIME = "qiime" -} +} \ No newline at end of file diff --git a/nextflow/amr-on-wb/params_google_batch.yaml b/nextflow/amr-on-wb/params_google_batch.yaml new file mode 100644 index 0000000..66196db --- /dev/null +++ b/nextflow/amr-on-wb/params_google_batch.yaml @@ -0,0 +1,31 @@ +pipeline: "fast_AMR" +reads: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/raw/*_R{1,2}.fastq.gz" +bam_files: null +host: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/host/chr21.fasta.gz" +host_index: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/host/chr21.fasta.gz*" +amr_index: null +amr: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/amr/megares_database_v3.00.fasta" +annotation: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/amr/megares_annotations_v3.00.csv" +kraken_db: null +kraken_confidence: 0.0 +output: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/results/test_results" +snp: "N" +deduped: "N" +prefix: "AMR" +threads: 4 +adapters: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/adapters/nextera.fa" +leading: 3 +trailing: 3 +slidingwindow: "4:15" +minlen: 36 +threshold: 80 +min: 5 +max: 100 +skip: 5 +samples: 1 +multiqc: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/multiqc" +p_trim_left_f: 25 +p_trim_left_r: 26 +p_trunc_len_f: 225 +p_trunc_len_r: 220 +dada2_db: "gs://sam-nextflow-vwb-dev-beaming-sprout-9366/amr-on-wb/data/qiime/gg-13-8-99-515-806-nb-classifier.qza" \ No newline at end of file diff --git a/nextflow/amr-on-wb/scripts/upload_data.sh b/nextflow/amr-on-wb/scripts/upload_data.sh index 08a44c9..17d3084 100755 --- a/nextflow/amr-on-wb/scripts/upload_data.sh +++ b/nextflow/amr-on-wb/scripts/upload_data.sh @@ -26,4 +26,4 @@ source "$CONFIG_FILE" DATA_DIR="${SCRIPT_DIR}/../data" # Upload data to GCS bucket -gcloud storage cp -r "${DATA_DIR}" gs://${GCS_BUCKET}/ +gcloud storage cp -r "${DATA_DIR}" gs://${GCS_BUCKET}/amr-on-wb/