I posted a question regarding lamdas in e.g. sampl...
# nf-schema
d
I posted a question regarding lamdas in e.g. samplesheets in #C02L5UB4Y9G earlier, but I suppose this is the place: The below wouldn't work, right?
Copy code
sample,fastq_1,fastq_2
arc00,{ params.pipelines_testdata_base_path + 'testdata/archaeal_duplicates00_1.fastq.gz' },{ params.pipelines_testdata_base_path + 'testdata/archaeal_duplicates00_2.fastq.gz' }
arc01,{ params.pipelines_testdata_base_path + 'testdata/archaeal_duplicates01_1.fastq.gz' },{ params.pipelines_testdata_base_path + 'testdata/archaeal_duplicates01_2.fastq.gz' }
arc02,{ params.pipelines_testdata_base_path + 'testdata/archaeal_duplicates02_1.fastq.gz' },{ params.pipelines_testdata_base_path + 'testdata/archaeal_duplicates02_2.fastq.gz' }
I.e., there's no way around needing to hardcode GitHub urls in test sample sheets? Which means that I have to update them before doing a PR to nf-core's repo from my fork?
(There's a
magmap
before the
testdata
missing.)
m
May I suggest a hack
n
nf-schema does not support this, Maxime's hack is solid though
m
It's not "my" hack
We used it in other pipeline
basically you modify the samplesheet via sed to get the correct path
that way it can work locally or with data from s3
I re-implemted the logic in #C06PHJM0Y3D tests as I needed to test a folder from within a samplesheet
-> https://github.com/nf-core/seqinspector/blob/dev/tests/lib/UTILS.groovy#L118-L170 So basically I download an archive, extract it, and change the path to it in the samplesheet
d
I
sed
it in the pipeline before passing it to nf-schema or in the test config? I'll check your example. Thanks!
m
Basically the same solution, but at a different level
👍 1
All theses are automated to allow for diverging from classic CI setup
old methylsed use plain sed to replace the path references use nextlow to replace the path seqinspector use nf-test to extract and then replace the path
d
The nf-test thing makes sense to me. Can't test right away. Might be back with further questions
m
Do not hesitate, I'll be happy to help out. As you probably noticed, I love tests
also, knowing what you intend to do might help out
👍 1
d
What I wanted to do (note the imperfect) was get one step further -- or the full length -- to fully dynamic test paths. That would mean handle paths to my local copy of the test-datasets repo, my fork and nf-core's GitHub repo without having to update paths inside sample sheets and similar. I realize this is very much against the principle of solving problems as simply as possible, so I think I give up on this and proceed with the actual feature I want to add to the pipeline. But thanks for all the tips! 🙂