Potential bug?: my sample names have dash/minus `...
# rnaseq
j
Potential bug?: my sample names have dash/minus
-
in their name, RNAseq pipeline produce
salmon.merged_.gene_counts.tsv
where the minus is replaced with dot. So when I try to run the differentialabundance pipeline using the original sample names, it complains that they are not found. This might be a default behaviour of R which tries to automatically fix column names when reading using
read.table
or just when creating a data.frame with
data.frame
Expected behaviour: Input sample names should not be altered.
m
Your suspicion is correct: R simply does not allow for a dash in column names. As far as the pipeline is concerned, there are just two options: Alter the column names or crash the run. The first option is evidently better, because in either way you will not be able to use the names as they are. There are a few more cases like this, e.g. sample names starting with a digit.
j
@Matthias Zepper By default, R does "fix" the names, but R will allow use of
-
in column names if properly told to:
Copy code
data.frame("foo-bar" = "baz") # converts to foo.bar
data.frame("foo-bar" = "baz", check.names = FALSE) # leaves as is
So IMHO, this is a fixable bug, but I have no idea where it needs to be fixed, whether inside DESeq or there is just some custom script that malforms the names. If the desire is to leave it as is, documentation or even check (like there is for a space in path) should be IMHO implemented.
t
Yes, the tables are created by the
tximport
in R, which does that, as you say (column names are supposed to be proper identifiers without special characters). Whether this should be this way is a debatable. I tend to agree with you that changing column names can be annoying. On the other hand, one might argue that these tables are probable being further analyzed in R again, where (unless the user is savy) the names will end up with dots anyway.
Don't know how trivial this is to fix, since there are not
data.frames
but several objects involved.
j
On the other hand, one might argue that these tables are probable being further analyzed in R again, where (unless the user is savy) the names will end up with dots anyway.
Skill issue. 😛 I will be happy to implement a similar check as is there for space in path. Point me where and I will do it tomorrow.
For illustration, I fixed the names back to dash for differentialabundance pipeline, which I assume is R heavier, and it was able to run it without problem, even the report is fine with
-
in column names.
t
The tables are generated here, in case you want to make a PR.
j
Amazing, thank you. Just a tiny question, is the test framework part of nextflow?
Never mind, I see it in nf-co.re docs.
👍 1