Michael Levin
08/26/2024, 5:24 PMI1, I2, I3, etc. are different directories of the mouse samples. Each have paired-end FASTQ files. The control is fasted and the rest are treatments (different kinds of HCD treatments). So, it’s basically Fasted vs. HCD, Fasted vs. HCD+MK2206, and Fasted vs. HCD+SPHINX31. Inside the input CSV file, for conditions, I can list Fasted, HCD+MK2206 and HCD+SPHINX31 in those columns. But, for contrast, from these two websites, would it be like this?
contrast treatment control
HCD_FASTED HCD FASTED
HCD+MK2206_FASTED HCD+MK2206 FASTED
HCD+SPHINX31_Fasted HCD+SPHINX31 FASTEDMichael Levin
09/02/2024, 3:55 PMMichael Levin
09/04/2024, 9:07 PMThomas Danhorn
09/04/2024, 9:35 PMsample1-sample2, it will interpret the - as "minus", and in a column name that is not acceptable. Same issue with + in names. Names safe to use with R contain letters, numbers, _, and ., and they cannot start with a number (if they do, R will prefix an X, and "illegal" characters will be replaced with ., all of which causes a mess, because now the output names are different from the input names, resulting in downstream errors).
• There are other processes in the pipeline, that use certain characters (SUPPA uses ., I think _ is also problematic somewhere) to combine and split names, and if your sample names contain these, they will be split in the wrong place, resulting in errors.
The work-around is to use "safe" names for samples, which I have found to be just letters & numbers (starting with a letter). In the constrast column of the contrasts sheet _ seems also acceptable (in addition to letters & numbers; the example suggests that - might work as well, but to be safe I'd rather not use it).
So you'll definitely have to change your sample names and contrast sheet accordingly. This is unsatisfying, so if you want to go through these various issues and document them well enough (what works where, and what doesn't) to submit issues on GitHub, feel free to do so (I have not had time).Michael Levin
09/05/2024, 12:57 AMThomas Danhorn
09/05/2024, 4:49 AMMichael Levin
09/05/2024, 12:29 PMError executing process > 'NFCORE_RNASPLICE:RNASPLICE:EDGER_DEU:EDGER_EXON (mouse_liver_utf8.csv)'
Caused by:
Process `NFCORE_RNASPLICE:RNASPLICE:EDGER_DEU:EDGER_EXON (mouse_liver_utf8.csv)` terminated with an error exit status (1)
Command executed:
run_edger_exon.R featurecounts mouse_liver_utf8.csv contrast_mouse_liver.csv 10
cat <<-END_VERSIONS > versions.yml
"NFCORE_RNASPLICE:RNASPLICE:EDGER_DEU:EDGER_EXON":
r-base: $(echo $(R --version 2>&1) | sed 's/^.*R version //; s/ .*$//')
bioconductor-edger: $(Rscript -e "library(edgeR); cat(as.character(packageVersion('edgeR')))")
END_VERSIONS
Command exit status:
1
Command output:
(empty)
Command error:
Loading required package: limma
Error in makeContrasts(contrasts = contrasts, levels = groups) :
The levels must by syntactically valid names in R, see help(make.names). Non-valid names: HCD_MK2206
Execution halted
Work dir:
/home/tud03125/pipeline/mouse_liver_rnasplice/work/45/4a5b8f4c72cf2a67146406f9f5a4cf
Tip: view the complete command output by changing to the process work dir and entering the command `cat .command.out`
Like that one? When asking ChatGPT, it gave me this diagnosis:
• The error you're encountering is related to how R is handling the condition names when using makeContrasts from the edgeR package. The message Non-valid names: HCD_MK2206 indicates that R considers the condition names you’re using as non-syntactically valid. Specifically, R is strict about how variable names are formatted, and certain characters (like +, -, and spaces) can cause issues.Thomas Danhorn
09/05/2024, 5:13 PMless -U, and if you see at the ^M at the ends, that might be the issue (fix with dos2unix or remove manually with an editor under Linux).