Hey Everyone, For nf-core/rnasplice, regarding co...
# rnasplice
m
Hey Everyone, For nf-core/rnasplice, regarding contrast, I have a question about formatting. These links: https://nf-co.re/rnasplice/1.0.4/docs/usage/#contrastsheet-input and https://github.com/nf-core/rnasplice/blob/1.0.4/assets/contrastsheet.csv gives me some guidelines. But, I’m planning to run these samples in the future: I1 – Fasted 1 I2 – Fasted 2 I3 – HCD 1 I4 – HCD 2 I5 – HCD+MK2206 -1 I6 – HCD+MK2206 -2 I7 – HCD+MK2206 -3 I8 – HCD+MK2206 -4 I9 – HCD+SPHINX31 -1 I10 – HCD+SPHINX31 -2 I11 – HCD+SPHINX31 -3
I1
,
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?
Copy code
contrast	treatment	control
HCD_FASTED	HCD	FASTED
HCD+MK2206_FASTED	HCD+MK2206	FASTED
HCD+SPHINX31_Fasted	HCD+SPHINX31	FASTED
#C0493FQQZ3P Hey Everyone, I haven't heard back about this question I'm having.
@Thomas Danhorn
t
I had some bad experiences with names in that pipeline, because there are a couple of issues (some of which at least might be considered bugs): • Some part of the pipeline use R packages, and if you give R a string like
sample1-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).
👍 1
m
About the “if your sample names contain these, they will be split in the wrong place, resulting in errors,” I’m curious on what kind of “errors?” Syntax errors or like “pipeline executed unsuccessfully” messages, or more of downstream analysis errors, where the pipeline runs successfully, but the results and thus analysis would be flawed, thus giving wrong conclusions and harming the overall research?
t
Don't recall the exact message, but it boils down to a process (and subsequently the pipeline) failing with a message that it could not find such a sample (with the wrong name) or some file derived from it, or something.
m
After running the PBS script, I got this error message:
Copy code
Error 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.
t
Your name looks valid, but if R says it isn't, there is probably a space or some non-printable character in there somewhere (I didn't mention spaces as "forbidden" since I considered that self-evident). Depending on how you input the characters, there could also be some funky unicode character that looks like a normal letter/number/`_` but is different, however I don't think that's the case here. Double-check your CSV files and if necessary retype them. If you are using an editor on Windows, it likely adds CR+LF line endings, while Linux only uses LF. Look at file under Linux with
less -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).
👍 1