Hoohm / dropSeqPipe

A SingleCell RNASeq pre-processing snakemake workflow
Creative Commons Attribution Share Alike 4.0 International
147 stars 47 forks source link

Human mitochondria weren't recognized due to capitalization #43

Closed seb-mueller closed 6 years ago

seb-mueller commented 6 years ago

Fixed by ignoring capitalization. Same is true for Ribosomal RNA.

seb-mueller commented 6 years ago

As for the mito/ribo names, I've implemented a pattern matching which matches "^mt-" to identify mito. This currently only works for Mouse. Human seems to match to capital, i.e. "^MT-". I'll try to adjust the code:

https://github.com/Hoohm/dropSeqPipe/blob/d4fe1e8faf5a3d6b0da607e244e37a0f0facdc02/scripts/plot_violine.R#L109

Justification:

> s <- c("mt-test","jiberish","MT-TEST")
> grep("^mt-", s, value=TRUE)
[1] "mt-test"
> grep("^MT-", s, value=TRUE)
[1] "MT-TEST"
> grep("^mt-|^mt-", s, value=TRUE)
[1] "mt-test"
> grep("^mt-|^MT-", s, value=TRUE)
[1] "mt-test" "MT-TEST"
> grep("^MT-", s, value=TRUE, ignore.case=TRUE)
[1] "mt-test" "MT-TEST"

I suppose

grep("^MT-", s, value=TRUE, ignore.case=TRUE)

will do the trick, therefore this PR. Same is true for rps and Rpl.

Another more general solution is to have a line in the config.yaml specifying the mito pattern(s). This could than be adjusted for whatever matches human mitos.