Hi, I was using a samplesheet that some IDs (RNA_I...
# drop
y
Hi, I was using a samplesheet that some IDs (RNA_ID, DNA_ID) are numbers instead of strings. At the first thought I found it is fine so I changed the restriction in
schema_input.json
for them to something like
Copy code
"RNA_ID": {
                "oneOf": [
                    {
                        "type": "string",
                        "pattern": "^\\S+$"
                    },
                    {
                        "type": "number"
                    }
                ],
but very soon I found out this seems cause error later in channel join steps, to be more specific, i got error like
Copy code
Join mismatch for the following entries: key=[id:kremer, drop_group:kremer, samples:35834,57415, …, group_size:119] values=
this would not happen if I remove those samples whose IDs are numbers. So it seems join can not handle the cases where there are numbers in the key? @Nicolas Vannieuwkerke in your experience, shall we avoid number as ID at all?
n
You can also do this in the schema
Copy code
"RNA_ID": {
    "type": ["string", "integer"],
    "pattern": "^\\S+$"
}
The join issues can be fixed by manually casting all entries of
RNA_ID
(and probably
DNA_ID
too) to a string right after reading in the samplesheet.
I can open a PR for that if you want
y
Ah, cool, good to know. That is nice, nothing urgent though. I am just running the real dataset and gathering some issue I got.
n
That's good! keep it coming 😉
Can you open an issue for this though? So we don't forget to fix it?
y
I already did 😛 it turned out I need to allow number as ID already to get this dataset running 🤯 can you maybe point me to the code of casting ( I guess it must be in some pipeline already)?
n
Yes, you can add the following lines to this meta addition: https://github.com/nf-core/drop/blob/33318ae6d14815a2bda5119d54c48f116dc5c1ce/subworkflows/local/utils_nfcore_drop_pipeline/main.nf#L123
Copy code
id: meta.id as String,
dna_id: meta.dna_id as String,
extreme teamwork 1