OK I need some nf-test/nft-utils experts: <https:/...
# nft-plugins
j
OK I need some nf-test/nft-utils experts: https://github.com/nf-core/taxprofiler/pull/695 Why is my
.nftignore
file being... ignored 😕 the snapshot is picking up md5sums for fastqc/and bbduk log files although they are excluded in the ignore file 😞
👀 1
m
I am looking at it
❤️ 1
j
Thank you, also realised it was sort of unfair to ask you privately so I opned it a bit wider 😉
m
Let me try something locally
👍 1
j
I'm confused because it works with or other test profile
m
IT TAKES forever to run
j
maaaybe
Should be 5-6 minutes
m
I think I got it
j
Please enlighten me oh oracle, this has been bugging me for days
m
be prepared
j
oh no
m
basically you have the expected results, because the path is wrong
j
confused dog
in
nftignore
?
m
yes
because of how the tests are designed
you want all files from outputDir/fastqc
it get resolved from this fastqc folder
j
Ahhhh
m
hence you don't need it in the .nftignore
j
So it's trying to ignore e.g.
outDir/fastqc/fastqc/*zip
?
m
this is the list of fastqc files from stable_name_all: "fastqc", "fastqc/processed", "fastqc/processed/2612_ERR5766176_B_processed_1_fastqc.html", "fastqc/processed/2612_ERR5766176_B_processed_1_fastqc.zip", "fastqc/processed/2612_ERR5766176_B_processed_2_fastqc.html", "fastqc/processed/2612_ERR5766176_B_processed_2_fastqc.zip", "fastqc/processed/2612_ERR5766176_processed_1_fastqc.html", "fastqc/processed/2612_ERR5766176_processed_1_fastqc.zip", "fastqc/processed/2612_ERR5766176_processed_2_fastqc.html", "fastqc/processed/2612_ERR5766176_processed_2_fastqc.zip", "fastqc/processed/2613_ERR5766181_processed_1_fastqc.html", "fastqc/processed/2613_ERR5766181_processed_1_fastqc.zip", "fastqc/processed/2613_ERR5766181_processed_2_fastqc.html", "fastqc/processed/2613_ERR5766181_processed_2_fastqc.zip", "fastqc/processed/ERR3201952_ERR3201952_processed_fastqc.html", "fastqc/processed/ERR3201952_ERR3201952_processed_fastqc.zip", "fastqc/raw", "fastqc/raw/2612_ERR5766176_B_raw_1_fastqc.html", "fastqc/raw/2612_ERR5766176_B_raw_1_fastqc.zip", "fastqc/raw/2612_ERR5766176_B_raw_2_fastqc.html", "fastqc/raw/2612_ERR5766176_B_raw_2_fastqc.zip", "fastqc/raw/2612_ERR5766176_raw_1_fastqc.html", "fastqc/raw/2612_ERR5766176_raw_1_fastqc.zip", "fastqc/raw/2612_ERR5766176_raw_2_fastqc.html", "fastqc/raw/2612_ERR5766176_raw_2_fastqc.zip", "fastqc/raw/2613_ERR5766181_raw_1_fastqc.html", "fastqc/raw/2613_ERR5766181_raw_1_fastqc.zip", "fastqc/raw/2613_ERR5766181_raw_2_fastqc.html", "fastqc/raw/2613_ERR5766181_raw_2_fastqc.zip", "fastqc/raw/ERR3201952_ERR3201952_raw_fastqc.html", "fastqc/raw/ERR3201952_ERR3201952_raw_fastqc.zip",
j
you want all files from outputDir/fastqc
Wait what do yo um ean by this
m
list of fastqc files: def stable_name_fastqc = getAllFilesFromDir("$outputDir/fastqc", relative: true, includeDir: true, ignoreFile: 'tests/.nftignore') "processed", "processed/2612_ERR5766176_B_processed_1_fastqc.html", "processed/2612_ERR5766176_B_processed_1_fastqc.zip", "processed/2612_ERR5766176_B_processed_2_fastqc.html", "processed/2612_ERR5766176_B_processed_2_fastqc.zip", "processed/2612_ERR5766176_processed_1_fastqc.html", "processed/2612_ERR5766176_processed_1_fastqc.zip", "processed/2612_ERR5766176_processed_2_fastqc.html", "processed/2612_ERR5766176_processed_2_fastqc.zip", "processed/2613_ERR5766181_processed_1_fastqc.html", "processed/2613_ERR5766181_processed_1_fastqc.zip", "processed/2613_ERR5766181_processed_2_fastqc.html", "processed/2613_ERR5766181_processed_2_fastqc.zip", "processed/ERR3201952_ERR3201952_processed_fastqc.html", "processed/ERR3201952_ERR3201952_processed_fastqc.zip", "raw", "raw/2612_ERR5766176_B_raw_1_fastqc.html", "raw/2612_ERR5766176_B_raw_1_fastqc.zip", "raw/2612_ERR5766176_B_raw_2_fastqc.html", "raw/2612_ERR5766176_B_raw_2_fastqc.zip", "raw/2612_ERR5766176_raw_1_fastqc.html", "raw/2612_ERR5766176_raw_1_fastqc.zip", "raw/2612_ERR5766176_raw_2_fastqc.html", "raw/2612_ERR5766176_raw_2_fastqc.zip", "raw/2613_ERR5766181_raw_1_fastqc.html", "raw/2613_ERR5766181_raw_1_fastqc.zip", "raw/2613_ERR5766181_raw_2_fastqc.html", "raw/2613_ERR5766181_raw_2_fastqc.zip", "raw/ERR3201952_ERR3201952_raw_fastqc.html", "raw/ERR3201952_ERR3201952_raw_fastqc.zip"
j
I want to exclude
you want all files from outputDir/fastqc/*/*.{zip,html}
becuase they are variableyou want all files from outputDir/fastqc
Is that beacause I gave
relative: true
?
Or because
ignodeDir: true
?
I don't really follow then...
m
I think it's because of getAllFilesFromDir("$outputDir/fastqc",
the fastqc part
j
OK
I think I'm following
m
Let me propose another idea that should be good for your setup
j
But it's making me again not like the
.nftiognore
😆
I would rather use juse
ignore [PATTERN]
But also then why does it appear to work with @Sofia Stamouli’s
default.nf.test
But I wait for your solution ❤️
m
she does not try to snapshot content of fastqc files
j
No, but she does it for others I think... ah but maybe doesn't need to mix with ignore...
good point
(have to do school run now, but look forward to your solution ❤️ ❤️ <3)
s
Maxime is right, I do not try to do snapshot of fastqc files.
m
I propose this:
Copy code
def stable_name_all               = getAllFilesFromDir(params.outdir, relative: true,  includeDir: true,  ignore: ['pipeline_info/*.{html,json,txt}'])
            def stable_content_adapterremoval = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["adapterremoval/*"])
            def stable_content_bbduk          = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["bbduk/*"])
            def stable_content_fastqc         = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["fastqc/*"])
            def stable_content_filtlong       = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["filtlong/*"])
            def stable_content_bowtie2        = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["bowtie2/*"])
            def stable_content_kaiju          = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["kaiju/*"])
            def stable_content_kraken2        = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["kraken2/*"])
            def stable_content_porechop       = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["porechop/*"])
            def stable_content_samtools       = getAllFilesFromDir(params.outdir, relative: false, includeDir: false, ignoreFile: 'tests/.nftignore', include: ["samtools/*"])
🙌 1
So @James Fellows Yates what do you think of my solution?
j
Haven't had a chance to try it yet but I'm very excited to try it
It's genius
Confirmed genius!
Well alsmot, some other weird behaviour but I Can debug this
(resolved that, just had t oreplace the
include: ["<name>/*"]
with
include: ["<name>/**"]
As some of the directories had subdirectories
m
good point
j
Ugh one more variable file
But otherwise I think it's working - thank you @Maxime Garcia!
Maybe should doucment it somewhere
m
you could add this to the docs in https://github.com/nf-core/nft-utils
j
Where though... the structure is a bit difficult to shoe horn it in (I was looking there previously)(