nextflow icon indicating copy to clipboard operation
nextflow copied to clipboard

Path includeInputs does not work for symlinks

Open pditommaso opened this issue 4 years ago • 10 comments

Try

process foo {
  input:
    path x from '/some/data/foo.txt'
  output:
    path '*', includeInputs:true into foo_ch
  """
  touch file.txt
  """
}

foo_ch.view { "foo: $it.name" }

pditommaso avatar Apr 03 '20 09:04 pditommaso

But this works:

#! /usr/bin/env nextflow

nextflow.preview.dsl=2

workflow {

    TEST_PATH(Channel.fromPath('test_ref.fa'))
    TEST_PATH.out.view()

}

process TEST_PATH {

    scratch true

    input:
    path reference

    output:
    path ("${reference}*",includeInputs:true)
 
    script:
    """
    touch ${reference}.fai
    touch ${reference}.bwt
    """

}

So it's just a dsl1 issue?

mahesh-panchal avatar Apr 03 '20 10:04 mahesh-panchal

I think I misunderstood. The problem is if the file does not exist, then it's not included in the output with includeInputs:true, right?

mahesh-panchal avatar Apr 03 '20 11:04 mahesh-panchal

I've seen happending when the input file is staged as symlink (default for shared hpc storage) the input file is not included even adding includeInputs:true

pditommaso avatar Apr 06 '20 12:04 pditommaso

Hmm. I'm not sure what to add to help. It's working for me on the HPC system I'm using and following symlinks. I'm also using process.scratch = '$SNIC_TMP', which evaluates to /scratch/<slurm_job_id>, singularity, nextflow v20.01.0, dsl2. cp is using cp (GNU coreutils) 8.22.

mahesh-panchal avatar Apr 06 '20 13:04 mahesh-panchal

But for you it's fine, isn't it?

pditommaso avatar Apr 06 '20 14:04 pditommaso

Yes. It's working fine for me.

Symlinks are being followed on my HPC system.

mahesh-panchal avatar Apr 06 '20 15:04 mahesh-panchal

Ok, I'll concentrate on my issue then :)

pditommaso avatar Apr 06 '20 15:04 pditommaso

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 03 '20 17:09 stale[bot]

keep open

pditommaso avatar Oct 12 '20 15:10 pditommaso

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Mar 11 '21 21:03 stale[bot]