zwdzwd / sesame

🍪 SEnsible Step-wise Analysis of DNA MEthylation BeadChips

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Which Variable name is used to handle illuminate ID

claus-h-g opened this issue · comments

When I use the openSesame function on an directory with Idata in combination with func=getBetas, I do obtain a df with Illumina IDs als column headers.

I try to find a way to name a df when reading in one idat pair. Do you assign the illumina id to one variable internally? I failed to identify the name of a variable from the source code.
Looking forward to your reply.
Best wishes
Claus

If I understand correctly, you might be looking for this. I assign the name of each sample based on the basename of the file. Usually that's either the Illumina ID or GSM (if downloaded from GEO), so it will be universally unique. In the rare case it is not (e.g., you changed the file names), you can assign it manually from lapply/mclapply etc.

Sorry for the late reply and unclear description. English is not my mother tongue.

Thanks for your reply - I do feel this is part of what I am looking for.

I do look for way to derive position stings looking like this: 206909630108_R07C01

I use the to annotate result obtained for one sample.

I took form your source code this code

grn.name <- '/path/to/206909630108_R07C01_Grn.idat'
ida.grn <- suppressWarnings(illuminaio::readIDAT(grn.name))
sampleID <- paste(ida.grn$Barcode, ida.grn$Unknowns$MostlyA, sep="_")
sampleID
[1] "206909630108_R07C01"

With this sample or position ID that should be unique around the world I would like to name all beta value dataframes I produce with sesame.
However here I would read the green idat twice. I would like to derive the position string directly from the openSesame, getBeta function in one step to rapidly analys many samples.
How would I do that?

I just learned the correct term. I am looking for the SentrixID

If I understand correctly you need to process many samples but not the whole directory

If that's the case, it will be as simple as

openSesame("a vector of path to the sample prefixes")
# or 
openSesame("/path/to/206909630108_R07C01")

I hope you have found a solution to this. but reopen the issue if not.