nf-core / rnavar

gatk4 RNA variant calling pipeline
https://nf-co.re/rnavar
MIT License
37 stars 32 forks source link

Gunzipping before STAR alignment on NTFS #99

Closed jcdaneshmand closed 1 year ago

jcdaneshmand commented 1 year ago

Description of feature

Hello rnavar devs,

This is a feature request as well as an ask for assistance, if possible.

Essentially, I would like to add a small step in the pipeline, right before STAR alignment, in which the fastq.gz files are gunzipped and the resulting uncompressed files are fed to STAR. I need to do this because I am working on a wsl2 ubuntu server with NTFS storage . (STAR has an issue with gzs on NTFS, it gives a FIFO error).

I have tried to do this on my own by adding the following code to the ALIGN_STAR subworkflow:


include { GUNZIP        } from '../../modules/nf-core/modules/gunzip/main'

...

workflow ALIGN_STAR {
    take:
    reads                   // channel: [ val(meta), [ reads ] ]
 ...
    main:
    ch_unzipped_fastq = Channel.empty()
    ch_versions = Channel.empty()

    // Iterate over each entry in the 'reads' channel
    reads.flatten().collect { meta, files ->
        // Use scatter to parallelize the unzipping process for all files in the current entry
        scatter (file in files) {
            // Unzip the file and add it to the ch_unzipped_fastq channel along with meta
            unzipped_file = GUNZIP(file)
            emit meta, unzipped_file
        }
    }

    // Collect the results into the 'ch_unzipped_fastq' channel
    collect { meta, unzipped_file -> ch_unzipped_fastq << [meta, unzipped_file] }

//
    // Map reads with STAR
    //

    STAR_ALIGN (
        ch_unzipped_fastq, // Use the unzipped fastq files as input
        index,
        gtf,
        star_ignore_sjdbgtf,
        seq_platform,
        seq_center
    )
    ch_versions = ch_versions.mix(STAR_ALIGN.out.versions.first())

...

`

Now when testing, I get the following exception, and I'm in over my head at the point. Nextflow is pretty new to me.


`Oct-04 04:00:59.049 [main] DEBUG nextflow.cli.Launcher - $> nextflow run /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar --outdir /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar_results --genome GRCh38 --dbsnp /mnt/e/GenomesAndIndexes/Homo_sapiens_assembly38.dbsnp138.vcf -profile docker,test
Oct-04 04:00:59.325 [main] INFO  nextflow.cli.CmdRun - N E X T F L O W  ~  version 23.04.4
Oct-04 04:00:59.351 [main] DEBUG nextflow.plugin.PluginsFacade - Setting up plugin manager > mode=prod; embedded=false; plugins-dir=/home/z8g4/.nextflow/plugins; core-plugins: nf-amazon@1.16.2,nf-azure@1.0.1,nf-codecommit@0.1.4,nf-console@1.0.5,nf-ga4gh@1.0.5,nf-google@1.7.3-patch1,nf-tower@1.5.12,nf-wave@0.8.4
Oct-04 04:00:59.377 [main] INFO  org.pf4j.DefaultPluginStatusProvider - Enabled plugins: []
Oct-04 04:00:59.387 [main] INFO  org.pf4j.DefaultPluginStatusProvider - Disabled plugins: []
Oct-04 04:00:59.392 [main] INFO  org.pf4j.DefaultPluginManager - PF4J version 3.4.1 in 'deployment' mode
Oct-04 04:00:59.450 [main] INFO  org.pf4j.AbstractPluginManager - No plugins
Oct-04 04:01:00.621 [main] DEBUG nextflow.config.ConfigBuilder - Found config local: /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/nextflow.config
Oct-04 04:01:00.623 [main] DEBUG nextflow.config.ConfigBuilder - Parsing config file: /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/nextflow.config
Oct-04 04:01:00.638 [main] DEBUG nextflow.config.ConfigBuilder - Applying config profile: `docker,test`
Oct-04 04:01:02.334 [main] DEBUG nextflow.config.ConfigBuilder - Available config profiles: [cfc_dev, ifb_core, denbi_qbic, alice, mjolnir_globe, uppmax, incliva, uge, rosalind_uge, lugh, unibe_ibu, vai, czbiohub_aws, jax, ccga_med, scw, tigem, tubingen_apg, google, apollo, ipop_up, googlels, eddie, medair, biowulf, bi, bigpurple, adcra, cedars, vsc_kul_uhasselt, pawsey_nimbus, ucl_myriad, utd_ganymede, charliecloud, icr_davros, ceres, munin, rosalind, hasta, cfc, uzh, ebi_codon_slurm, ebc, ku_sund_dangpu, ccga_dx, crick, marvin, biohpc_gen, shifter, mana, unc_lccc, wehi, awsbatch, wustl_htcf, imperial, maestro, software_license, genotoul, nci_gadi, abims, janelia, nu_genomics, googlebatch, oist, sahmri, mpcdf, leicester, vsc_ugent, sage, cambridge, podman, ebi_codon, cheaha, xanadu, test, computerome, ucd_sonic, seg_globe, sanger, dkfz, pasteur, ethz_euler, test_full, tuos_stanage, azurebatch, hki, crukmi, docker, engaging, gis, hypatia, psmn, eva, fgcz, conda, crg, singularity, uw_hyak_pedslabs, prince, utd_sysbio, debug, genouest, cbe, phoenix, seawulf, fub_curta, uct_hpc, aws_tower, binac]
Oct-04 04:01:02.392 [main] DEBUG nextflow.cli.CmdRun - Applied DSL=2 from script declararion
Oct-04 04:01:02.422 [main] INFO  nextflow.cli.CmdRun - Launching `/mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/main.nf` [hopeful_cajal] DSL2 - revision: e58604470a
Oct-04 04:01:02.425 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins default=[]
Oct-04 04:01:02.426 [main] DEBUG nextflow.plugin.PluginsFacade - Plugins resolved requirement=[]
Oct-04 04:01:02.432 [main] DEBUG nextflow.secret.LocalSecretsProvider - Secrets store: /home/z8g4/.nextflow/secrets/store.json
Oct-04 04:01:02.437 [main] DEBUG nextflow.secret.SecretsLoader - Discovered secrets providers: [nextflow.secret.LocalSecretsProvider@25ae1f80] - activable => nextflow.secret.LocalSecretsProvider@25ae1f80
Oct-04 04:01:02.509 [main] DEBUG nextflow.Session - Session UUID: 683d52bb-c7e0-4c8f-960f-ce50d23727a5
Oct-04 04:01:02.510 [main] DEBUG nextflow.Session - Run name: hopeful_cajal
Oct-04 04:01:02.512 [main] DEBUG nextflow.Session - Executor pool size: 40
Oct-04 04:01:02.525 [main] DEBUG nextflow.util.ThreadPoolBuilder - Creating thread pool 'FileTransfer' minSize=10; maxSize=120; workQueue=LinkedBlockingQueue[10000]; allowCoreThreadTimeout=false
Oct-04 04:01:02.551 [main] DEBUG nextflow.cli.CmdRun - 
  Version: 23.04.4 build 5881
  Created: 25-09-2023 15:34 UTC (11:34 EDT)
  System: Linux 5.10.16.3-microsoft-standard-WSL2
  Runtime: Groovy 3.0.16 on OpenJDK 64-Bit Server VM 11.0.13+7-b1751.21
  Encoding: UTF-8 (UTF-8)
  Process: 17538@DESKTOP-8I83U5J [127.0.1.1]
  CPUs: 40 - Mem: 1.2 TB (985.3 GB) - Swap: 0 (0)
Oct-04 04:01:02.619 [main] DEBUG nextflow.Session - Work-dir: /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/work [v9fs]
Oct-04 04:01:02.660 [main] DEBUG nextflow.executor.ExecutorFactory - Extension executors providers=[]
Oct-04 04:01:02.675 [main] DEBUG nextflow.Session - Observer factory: DefaultObserverFactory
Oct-04 04:01:02.754 [main] DEBUG nextflow.cache.CacheFactory - Using Nextflow cache factory: nextflow.cache.DefaultCacheFactory
Oct-04 04:01:02.769 [main] DEBUG nextflow.util.CustomThreadPool - Creating default thread pool > poolSize: 41; maxThreads: 1000
Oct-04 04:01:03.407 [main] DEBUG nextflow.Session - Session start
Oct-04 04:01:03.413 [main] DEBUG nextflow.trace.TraceFileObserver - Workflow started -- trace file: /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar_results/pipeline_info/execution_trace_2023-10-04_04-01-01.txt
Oct-04 04:01:03.441 [main] DEBUG nextflow.Session - Using default localLib path: /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/lib
Oct-04 04:01:03.506 [main] DEBUG nextflow.Session - Adding to the classpath library: /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/lib
Oct-04 04:01:03.511 [main] DEBUG nextflow.Session - Adding to the classpath library: /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/lib/nfcore_external_java_deps.jar
Oct-04 04:01:04.840 [main] DEBUG nextflow.script.ScriptRunner - > Launching execution
Oct-04 04:01:05.505 [main] INFO  nextflow.Nextflow - 

------------------------------------------------------
                                        ,--./,-.
        ___     __   __   __   ___     /,-._.--~'
  |\ | |__  __ /  ` /  \ |__) |__         }  {
  | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                        `._,._,'
  nf-core/rnavar v1.0.0
------------------------------------------------------
Core Nextflow options
  runName                   : hopeful_cajal
  containerEngine           : docker
  launchDir                 : /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar
  workDir                   : /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/work
  projectDir                : /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar
  userName                  : z8g4
  profile                   : docker,test
  configFiles               : /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar/nextflow.config

Input/output options
  input                     : https://raw.githubusercontent.com/nf-core/test-datasets/rnavar/samplesheet/v1.0/samplesheet.csv
  outdir                    : /mnt/e/Repositories/Jonah/SFT_nextflow/rnavar_results

Reference genome options
  genome                    : GRCh38
  fasta                     : https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.fasta
  dict                      : https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.dict
  gtf                       : https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/genomics/homo_sapiens/genome/genome.gtf
  read_length               : 150
  known_indels              : https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/genome/vcf/mills_and_1000G.indels.vcf.gz
  known_indels_tbi          : https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/genome/vcf/mills_and_1000G.indels.vcf.gz.tbi
  dbsnp                     : /mnt/e/GenomesAndIndexes/Homo_sapiens_assembly38.dbsnp138.vcf
  dbsnp_tbi                 : https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/genome/vcf/dbsnp_146.hg38.vcf.gz.tbi
  snpeff_db                 : WBcel235.99
  vep_genome                : WBcel235
  vep_species               : caenorhabditis_elegans
  vep_cache_version         : 104

Alignment options
  star_index                : https://github.com/nf-core/test-datasets/raw/modules/data/genomics/homo_sapiens/genome/index/star/star.tar.gz
  star_twopass              : true

Variant Annotation
  annotate_tools            : merge

Institutional config options
  config_profile_name       : Test profile
  config_profile_description: Minimal test dataset to check pipeline function

Max job request options
  max_cpus                  : 2
  max_memory                : 6.GB
  max_time                  : 6.h

!! Only displaying parameters that differ from the pipeline defaults !!
------------------------------------------------------
If you use nf-core/rnavar for your analysis please cite:

* The nf-core framework
  https://doi.org/10.1038/s41587-020-0439-x

* Software dependencies
  https://github.com/nf-core/rnavar/blob/master/CITATIONS.md
------------------------------------------------------
Oct-04 04:01:28.840 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:process_low` matches labels `process_low` for process with name NFCORE_RNAVAR:RNAVAR:PREPARE_GENOME:GTF2BED
Oct-04 04:01:28.842 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:GTF2BED` matches process NFCORE_RNAVAR:RNAVAR:PREPARE_GENOME:GTF2BED
Oct-04 04:01:28.848 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct-04 04:01:28.849 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct-04 04:01:28.858 [main] DEBUG nextflow.executor.Executor - [warm up] executor > local
Oct-04 04:01:28.865 [main] DEBUG n.processor.LocalPollingMonitor - Creating local task monitor for executor 'local' > cpus=40; memory=1.2 TB; capacity=40; pollInterval=100ms; dumpInterval=5m
Oct-04 04:01:28.967 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:process_low` matches labels `process_low` for process with name NFCORE_RNAVAR:RNAVAR:PREPARE_GENOME:SAMTOOLS_FAIDX
Oct-04 04:01:28.974 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:SAMTOOLS_FAIDX` matches process NFCORE_RNAVAR:RNAVAR:PREPARE_GENOME:SAMTOOLS_FAIDX
Oct-04 04:01:28.979 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct-04 04:01:28.987 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct-04 04:01:29.012 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:process_low` matches labels `process_low` for process with name NFCORE_RNAVAR:RNAVAR:PREPARE_GENOME:UNTAR_STAR_INDEX
Oct-04 04:01:29.019 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:UNTAR_.*` matches process NFCORE_RNAVAR:RNAVAR:PREPARE_GENOME:UNTAR_STAR_INDEX
Oct-04 04:01:29.077 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:UNTAR_.*|STAR_GENOMEGENERATE` matches process NFCORE_RNAVAR:RNAVAR:PREPARE_GENOME:UNTAR_STAR_INDEX
Oct-04 04:01:29.082 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct-04 04:01:29.083 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct-04 04:01:29.171 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:NFCORE_RNAVAR:RNAVAR:INPUT_CHECK:SAMPLESHEET_CHECK` matches process NFCORE_RNAVAR:RNAVAR:INPUT_CHECK:SAMPLESHEET_CHECK
Oct-04 04:01:29.174 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct-04 04:01:29.175 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct-04 04:01:29.231 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:process_low` matches labels `process_low` for process with name NFCORE_RNAVAR:RNAVAR:CAT_FASTQ
Oct-04 04:01:29.249 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:CAT_FASTQ` matches process NFCORE_RNAVAR:RNAVAR:CAT_FASTQ
Oct-04 04:01:29.252 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct-04 04:01:29.259 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct-04 04:01:29.288 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:process_medium` matches labels `process_medium` for process with name NFCORE_RNAVAR:RNAVAR:FASTQC
Oct-04 04:01:29.289 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:FASTQC` matches process NFCORE_RNAVAR:RNAVAR:FASTQC
Oct-04 04:01:29.291 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct-04 04:01:29.292 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct-04 04:01:29.312 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:process_medium` matches labels `process_medium` for process with name NFCORE_RNAVAR:RNAVAR:GATK4_BEDTOINTERVALLIST
Oct-04 04:01:29.313 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:GATK4_BEDTOINTERVALLIST` matches process NFCORE_RNAVAR:RNAVAR:GATK4_BEDTOINTERVALLIST
Oct-04 04:01:29.316 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct-04 04:01:29.317 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct-04 04:01:29.330 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withLabel:process_medium` matches labels `process_medium` for process with name NFCORE_RNAVAR:RNAVAR:GATK4_INTERVALLISTTOOLS
Oct-04 04:01:29.332 [main] DEBUG nextflow.script.ProcessConfig - Config settings `withName:GATK4_INTERVALLISTTOOLS` matches process NFCORE_RNAVAR:RNAVAR:GATK4_INTERVALLISTTOOLS
Oct-04 04:01:29.335 [main] DEBUG nextflow.executor.ExecutorFactory - << taskConfig executor: null
Oct-04 04:01:29.336 [main] DEBUG nextflow.executor.ExecutorFactory - >> processorType: 'local'
Oct-04 04:01:29.363 [main] DEBUG nextflow.Session - Session aborted -- Cause: Missing process or function doCall([Script_e95846d7$_runScript_closure1$_closure2@292be875])
Oct-04 04:01:29.450 [main] DEBUG nextflow.Session - The following nodes are still active:
  [operator] collect
  [operator] collect
  [operator] collect
  [operator] collect
  [operator] collect
  [operator] collect
  [operator] collect
  [operator] mix
  [operator] map
  [operator] map
  [operator] collect
  [operator] mix
  [operator] collect
  [operator] map
  [operator] map
  [operator] collect
  [operator] mix
  [operator] ifEmpty
  [operator] combine
  [operator] mix
  [operator] splitCsv
  [operator] map
  [operator] map
  [operator] groupTuple
  [operator] branch
  [operator] mix
  [operator] mix
  [operator] ifEmpty
  [operator] mix
  [operator] collect
  [operator] ifEmpty
  [operator] mix
  [operator] mix
  [operator] ifEmpty
  [operator] mix
  [operator] map
  [operator] flatten
  [operator] flatten
  [operator] collect

Oct-04 04:01:29.493 [main] ERROR nextflow.cli.Launcher - @unknown
nextflow.exception.MissingProcessException: Missing process or function doCall([Script_e95846d7$_runScript_closure1$_closure2@292be875])
    at nextflow.script.WorkflowDef.run(WorkflowDef.groovy:191)
    at nextflow.script.BindableDef.invoke_a(BindableDef.groovy:51)
    at nextflow.script.ComponentDef.invoke_o(ComponentDef.groovy:40)
    at nextflow.script.WorkflowBinding.invokeMethod(WorkflowBinding.groovy:102)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:408)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:350)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
    at Script_e8ecf00b$_runScript_closure1$_closure3.doCall(Script_e8ecf00b:215)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
    at groovy.lang.Closure.call(Closure.java:412)
    at groovy.lang.Closure.call(Closure.java:406)
    at nextflow.script.WorkflowDef.run0(WorkflowDef.groovy:204)
    at nextflow.script.WorkflowDef.run(WorkflowDef.groovy:188)
    at nextflow.script.BindableDef.invoke_a(BindableDef.groovy:51)
    at nextflow.script.ComponentDef.invoke_o(ComponentDef.groovy:40)
    at nextflow.script.WorkflowBinding.invokeMethod(WorkflowBinding.groovy:102)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:408)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:350)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:176)
    at Script_58c04bec$_runScript_closure1$_closure3.doCall(Script_58c04bec:55)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
    at groovy.lang.Closure.call(Closure.java:412)
    at groovy.lang.Closure.call(Closure.java:406)
    at nextflow.script.WorkflowDef.run0(WorkflowDef.groovy:204)
    at nextflow.script.WorkflowDef.run(WorkflowDef.groovy:188)
    at nextflow.script.BindableDef.invoke_a(BindableDef.groovy:51)
    at nextflow.script.ComponentDef.invoke_o(ComponentDef.groovy:40)
    at nextflow.script.WorkflowBinding.invokeMethod(WorkflowBinding.groovy:102)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeOnDelegationObjects(ClosureMetaClass.java:408)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:350)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:176)
    at Script_58c04bec$_runScript_closure2$_closure4.doCall(Script_58c04bec:69)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
    at groovy.lang.Closure.call(Closure.java:412)
    at groovy.lang.Closure.call(Closure.java:406)
    at nextflow.script.WorkflowDef.run0(WorkflowDef.groovy:204)
    at nextflow.script.WorkflowDef.run(WorkflowDef.groovy:188)
    at nextflow.script.BindableDef.invoke_a(BindableDef.groovy:51)
    at nextflow.script.IterableDef$invoke_a.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139)
    at nextflow.script.BaseScript.run0(BaseScript.groovy:183)
    at nextflow.script.BaseScript.run(BaseScript.groovy:192)
    at nextflow.script.ScriptParser.runScript(ScriptParser.groovy:229)
    at nextflow.script.ScriptRunner.run(ScriptRunner.groovy:224)
    at nextflow.script.ScriptRunner.execute(ScriptRunner.groovy:130)
    at nextflow.cli.CmdRun.run(CmdRun.groovy:368)
    at nextflow.cli.Launcher.run(Launcher.groovy:494)
    at nextflow.cli.Launcher.main(Launcher.groovy:665)
Caused by: groovy.lang.MissingMethodException: No signature of method: Script_e95846d7$_runScript_closure1$_closure2$_closure4.doCall() is applicable for argument types: (Script_e95846d7$_runScript_closure1$_closure2) values: [Script_e95846d7$_runScript_closure1$_closure2@292be875]
Possible solutions: doCall(java.lang.Object, java.lang.Object), findAll(), findAll(), isCase(java.lang.Object), isCase(java.lang.Object)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:266)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
    at groovy.lang.Closure.call(Closure.java:412)
    at groovy.lang.Closure.call(Closure.java:428)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3601)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3540)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.collect(DefaultGroovyMethods.java:3526)
    at org.codehaus.groovy.runtime.dgm$102.doMethodInvoke(Unknown Source)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:61)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:185)
    at Script_e95846d7$_runScript_closure1$_closure2.doCall(Script_e95846d7:34)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
    at groovy.lang.Closure.call(Closure.java:412)
    at groovy.lang.Closure.call(Closure.java:406)
    at nextflow.script.WorkflowDef.run0(WorkflowDef.groovy:204)
    at nextflow.script.WorkflowDef.run(WorkflowDef.groovy:188)
    ... 78 common frames omitted

`

I'd really like a way to do this. I am trying to run a variant analysis with this pipeline on many RNA-seq samples. Is there any option I'm missing or something I'm doing wrong with my code? Thank you so much for any of your time.

jcdaneshmand commented 1 year ago

What ended up working for me was creating a process for unzipping the reads like this:

process UNZIP_READS {
    label 'process_low'

    conda (params.enable_conda ? "conda-forge::sed=4.7" : null)
    container "${workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
        'https://depot.galaxyproject.org/singularity/ubuntu:20.04' :
        'ubuntu:20.04'}"

    input:
    tuple val(meta), path(reads)

    output:
    tuple val(meta), path('*uncompressed.fastq'), emit: ch_unzipped_fastq

    // Set a longer execution time limit for this process (e.g., 8 hours)
    time '48h'

    script:
    """
    #!/bin/bash

    # Create an array from the space-separated list
    read -a files <<< "$reads"

    # Define a function to unzip a file
    unzip_file() {
        inputFile="\$1"
        outputFile="\$(dirname \${inputFile})/\$(basename \${inputFile}).uncompressed.fastq"
        gunzip -c \${inputFile} > \${outputFile}
    }

    # Iterate over input files and call the unzip_file function
    for file in "\${files[@]}"; do
        \$(unzip_file "\$file")
    done
    """
}

And then within the align star workflow:

include { UNZIP_READS        } from '../../modules/nf-core/modules/gunzip/UNZIP_READS'

workflow ALIGN_STAR {
    take:
    reads                   // channel: [ val(meta), [ reads ] ]
    index                   // channel: /path/to/star/index/
    gtf                     // channel: /path/to/genome.gtf
    star_ignore_sjdbgtf     // value:   ignore gtf
    seq_platform            // value:   sequencing platform
    seq_center              // value:   sequencing centre

    main:
    ch_unzipped_fastq = Channel.empty()
    ch_versions = Channel.empty()

    // Call the UNZIP_READS process
    UNZIP_READS(reads)

    STAR_ALIGN (
        //reads,
        UNZIP_READS.out.ch_unzipped_fastq, // Use the unzipped fastq files as input
        index,
        gtf,
        star_ignore_sjdbgtf,
        seq_platform,
        seq_center
    )