<@UEM37TBAR> It appears that the fasta files are n...
# taxprofiler
l
@James Fellows Yates It appears that the fasta files are not separately grouped by short/long reads in the reads channels for profiling, unlike how the FASTQ files are grouped. Below is example of Krakenuniq reads channels:
Copy code
[DUMP: krakenuniq_input_reads] [['id':'db6', 'single_end':true, 'seqtype':'fasta', 'tool':'krakenuniq', 'db_name':'db6', 'db_params':'', 'type':'short'], [/nf-core/test-datasets/taxprofiler/data/fasta/ERX5474930_ERR5766174_1.fa.gz, /home/lili.li/test-datasets/data/fasta/ERR3201952.fa.gz]]
[DUMP: krakenuniq_input_reads] [['id':'db6', 'single_end':true, 'seqtype':'fastq', 'tool':'krakenuniq', 'db_name':'db6', 'db_params':'', 'type':'short'], [/home/lili.li/taxprofiler_update_new/work/58/ebf71548e5fff3ccbe798c8a7cfb73/2613_ERR5766181.unmapped.fastq.gz, /home/lili.li/taxprofiler_update_new/work/b5/8a5e3e569a6a6e439ee5842487d423/2612.merged.fastq.gz]]
[DUMP: krakenuniq_input_reads] [['id':'db6', 'single_end':true, 'seqtype':'fastq', 'tool':'krakenuniq', 'db_name':'db6', 'db_params':'', 'type':'long'], [/home/lili.li/taxprofiler_update_new/work/3e/5a2f28aa5602480ee8d9ec0ac77b25/ERR3201952_ERR3201952.unmapped_other.fastq.gz]]
j
Sorry I don't follow... Can you expand?
l
Do you remember we set the datatype as short, long, or both? The idea was to run the short DB for short reads, the long DB for long reads, and both for short & long reads. So we combined db and reads by type (short, long or both). But that was only for FASTQ files. we didn’t do any separation for FASTA files. See this block:
Copy code
.branch { meta, run_accession, instrument_platform, fastq_1, fastq_2, fasta ->
            fastq: meta.single_end || fastq_2
                return [ meta + [ type: "short" ], fastq_2 ? [ fastq_1, fastq_2 ] : [ fastq_1 ] ]
            nanopore: instrument_platform == 'OXFORD_NANOPORE'
                return [ meta, fastq_2 ? [ fastq_1, fastq_2 ] : [ fastq_1 ] ]
            nanopore: instrument_platform == 'OXFORD_NANOPORE' && !meta.is_fasta
                meta.single_end = true
                return [ meta + [ type: "long" ], [ fastq_1 ] ]
            fasta: meta.is_fasta
                meta.single_end = true
                return [ meta + [ type: "short" ], [ fasta ] ]
        }
j
Ah do you mean separation for long and short?
l
Yes
j
I don't see why anyone would have short reads in fasta format...
l
Sorry, i am bad at explaining things
j
No it's ok, it makes sense I'm just tired and trying to stop Teo grab the dogs tail 🤣
😂 2
I don't see why anyone would have short reads in fasta format...
People occasionally did that 10 years ago but I myself have not seen short reads in FASTA for a very long time
l
We do have both Illumina and Nanopore in test samplesheet. Then should I set the type into long:
Copy code
fasta: meta.is_fasta
                meta.single_end = true
                return [ meta + [ type: "long" ], [ fasta ] ]
j
Hrm
Good question
For now yes let's say always long
l
Another thing: we can not have the same file name for illumina and nanopore fasta files. That’s why we start to look into the reads channels. https://github.com/nf-core/taxprofiler/actions/runs/10716650546/job/29714613007?pr=512
j
Even if illumia
l
It’s easy to fix it. Separated branches for fasta illumina and nanopore.
Copy code
.branch { meta, run_accession, instrument_platform, fastq_1, fastq_2, fasta ->
            fastq: meta.single_end || fastq_2
                return [ meta + [ type: "short" ], fastq_2 ? [ fastq_1, fastq_2 ] : [ fastq_1 ] ]
            nanopore: instrument_platform == 'OXFORD_NANOPORE' && !meta.is_fasta
                meta.single_end = true
                return [ meta + [ type: "long" ], [ fastq_1 ] ]
            fasta_short: meta.is_fasta && instrument_platform == 'ILLUMINA'
                meta.single_end = true
                return [ meta + [ type: "short" ], [ fasta ] ]
            fasta_long: meta.is_fasta && instrument_platform == 'OXFORD_NANOPORE'
                meta.single_end = true
                return [ meta + [ type: "long" ], [ fasta ] ]
        }
Can I fix it
j
Yeah sure!
I'm not the boss 😬
l
You are more than boss. I always feel more confident after talking to you😊
Sorry to bother you 😔
j
Haha, not a bother at all! I meant more you're welcome to make decisions (if something makes sense and is easy, go for it, no need for my approval - that's what PRs are for ;))
tenor_gif8937735612168457209.gif
❤️ 2