diff --git a/.gitpod.yml b/.gitpod.yml index cb19981..e713fd7 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,3 +1,5 @@ +image: nfcore/gitpod:latest + # List the start up tasks. Learn more https://www.gitpod.io/docs/config-start-tasks/ tasks: - name: Download Nextflow Tutorial @@ -10,6 +12,8 @@ tasks: nextflow info unset JAVA_TOOL_OPTIONS echo 'Starting workspace !' + sudo apt-get update + sudo apt-get install -y screen # List the ports to expose. Learn more https://www.gitpod.io/docs/config-ports/ ports: - port: 8000 \ No newline at end of file diff --git a/README.md b/README.md index 12c0841..6d2beae 100755 --- a/README.md +++ b/README.md @@ -230,6 +230,12 @@ nextflow run main.nf -profile apptainer,local -resume \ nextflow run main.nf -profile docker,aws_batch -resume --input data/input_manual.csv --database "s3://pollen-metabarcoding-test-data/data/viridiplantae_all_2014.sintax.fa" --FW_primer "ATGCGATACTTGGTGTGAAT" --RV_primer "GCATATCAATAAGCGGAGGA" --custom_config /path/to/custom/config ``` +* Running on Gitpod: +If you wish to run on Gitpod, please be aware that the usearch (sintax_summary) module will fail, as Gitpod doesn't allow 32bit programs. +``` +nextflow run main.nf -profile docker,test_small -resume --gitpod +``` + ## Test Data The data used to test this pipeline via the [ENA ID: PRJEB26439](http://www.ebi.ac.uk/ena/data/view/PRJEB26439). There are two test profiles using this data: diff --git a/main.nf b/main.nf index d2996a5..3988337 100755 --- a/main.nf +++ b/main.nf @@ -91,8 +91,10 @@ workflow { VSEARCH_SINTAX(ch_sintax.fa, ch_sintax.db) ch_versions = ch_versions.mix(VSEARCH_SINTAX.out.versions.first()) + if (params.gitpod == null){ USEARCH_SINTAX_SUMMARY(VSEARCH_SINTAX.out.tsv) ch_versions = ch_versions.mix(USEARCH_SINTAX_SUMMARY.out.versions.first()) + } //Sometimes sintax produces different row lengths, only need first 2 CUTTING(VSEARCH_SINTAX.out.tsv) | R_PROCESSING diff --git a/nextflow.config b/nextflow.config index 9ac1e96..fdeb969 100755 --- a/nextflow.config +++ b/nextflow.config @@ -57,6 +57,8 @@ params { sintax_cutoff = null sintax_strand = null seed = 1312 + //gitpod + gitpod = null //defaults used by Eco-Flow when testing, overwrite on command-line with your own resources awsqueue = 'HUNDRED_QUEUE' awsregion = 'us-east-1' diff --git a/nextflow_schema.json b/nextflow_schema.json index b3df62f..0524480 100755 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -191,6 +191,10 @@ "forks": { "type": "number", "description": "Maximum number of each process that will be run in parallel." + }, + "gitpod": { + "type": "boolean", + "description": "Skips usearch process, which does not run on gitpod (32bit)" } } }, diff --git a/tests/modules/local/r_processing.nf.test.snap b/tests/modules/local/r_processing.nf.test.snap index 723d6b1..96a5776 100644 --- a/tests/modules/local/r_processing.nf.test.snap +++ b/tests/modules/local/r_processing.nf.test.snap @@ -2,12 +2,12 @@ "r_processing": { "content": [ "ERR2537816.classified.tsv:md5,d7536874f239e304cca7667dc1ffde4d", - "summary.tsv:md5,4a575d1bc4bfb5f79cf160ae793e9c30" + "summary.tsv:md5,cdd728c2daee0aa13fcee439ff3460c2" ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-03-27T13:36:37.712309" + "timestamp": "2024-04-04T11:11:20.884715539" } } \ No newline at end of file diff --git a/tests/modules/nf-core/cutadapt/main.nf.test.snap b/tests/modules/nf-core/cutadapt/main.nf.test.snap index 5a1d472..e27dfe4 100644 --- a/tests/modules/nf-core/cutadapt/main.nf.test.snap +++ b/tests/modules/nf-core/cutadapt/main.nf.test.snap @@ -1,13 +1,13 @@ { "cutadapt_fastqs": { "content": [ - "ERR2537816_1.trim.fastq.gz:md5,f9cb0dd1a4e2c3c871358d4d8dc7e490", - "ERR2537816_2.trim.fastq.gz:md5,c8333cd8e2f72a52122edf20ed159421" + "ERR2537816_1.trim.fastq.gz:md5,e9c82243f237a047eb2e095ed08da2f8", + "ERR2537816_2.trim.fastq.gz:md5,757f99993765c836965d6633bfbb5c97" ], "meta": { "nf-test": "0.8.4", "nextflow": "23.10.1" }, - "timestamp": "2024-03-27T13:54:45.929629" + "timestamp": "2024-04-05T11:14:03.65794141" } } \ No newline at end of file diff --git a/tests/modules/nf-core/vsearch/sintax/main.nf.test b/tests/modules/nf-core/vsearch/sintax/main.nf.test index 772563f..d4a7c28 100755 --- a/tests/modules/nf-core/vsearch/sintax/main.nf.test +++ b/tests/modules/nf-core/vsearch/sintax/main.nf.test @@ -27,7 +27,7 @@ nextflow_process { assert tsv[0].size() == 2 assert tsv[0][0].size() == 2 } - + assert snapshot(process.out).match() } } diff --git a/tests/modules/nf-core/vsearch/sintax/main.nf.test.snap b/tests/modules/nf-core/vsearch/sintax/main.nf.test.snap new file mode 100644 index 0000000..3cc0cab --- /dev/null +++ b/tests/modules/nf-core/vsearch/sintax/main.nf.test.snap @@ -0,0 +1,37 @@ +{ + "Should run without failures": { + "content": [ + { + "0": [ + [ + { + "id": "ERR2537816", + "single_end": false + }, + "ERR2537816.tsv:md5,84351a56e4ddf56df7403c9ffefa0f1b" + ] + ], + "1": [ + "versions.yml:md5,6584e256329124c6abe9e76715edfe92" + ], + "tsv": [ + [ + { + "id": "ERR2537816", + "single_end": false + }, + "ERR2537816.tsv:md5,84351a56e4ddf56df7403c9ffefa0f1b" + ] + ], + "versions": [ + "versions.yml:md5,6584e256329124c6abe9e76715edfe92" + ] + } + ], + "meta": { + "nf-test": "0.8.4", + "nextflow": "23.10.1" + }, + "timestamp": "2024-04-04T12:52:09.921597141" + } +} \ No newline at end of file