Subsetting GSE data with information from two different slots
1
0
Entering edit mode
A ▴ 40
@a-14337
Last seen 5 months ago
United Kingdom

Hi all, 

I was wondering if anybody could help. I have relatively simple problem, but can't seem to figure out the solution. I am trying to subset some data from a GSE sequencing data that contains 100+ sequencing samples. I am subsetting based on tissue type (and normal vs tumor).

The problem I am having is as follows: I am trying to subset two conditions from one tissue (age). Neonatal liver and adult liver. Which are named as "neonatal liver" or just "liver" for the adult liver. I am subsetting through a slot (source_name) that contains this information as follows:

gse<-getGEO("GSE78076", GSEMatrix = TRUE, getGPL = FALSE)

gse<-gse[[1]]
head(gse)
subset<- gse[,65:103]
subset

levels(subset$source_name_ch1)
lvls<-c("liver", "neonatal liver")
lvls
es<-subset[,subset$source_name_ch1 %in% lvls]
table(lvls)
boxplot(es)
es$source_name_ch1<-factor(es$source_name_ch1, levels = lvls)
es$source_name_ch1

es$source_name_ch1
 [1] liver          liver          liver          liver          liver          liver          liver          liver          liver          liver         
[11] liver          liver          liver          liver          neonatal liver neonatal liver neonatal liver
Levels: liver neonatal liver

This works fine and subsets the data into neonatal liver and adult liver. Within "liver" however, there are different treatments. normal adult liver, or liver that has been treated with a damaging agent. This is all named as "liver"

Information about the the damaging agent vs non damaging agent is in a different slot, es$description, and I am having trouble subsetting my data based on these two slots so that I can actually tease apart neonatal liver, adult liver, and then liver treated with the damaging agent.

es$description
                       V69                        V70                        V71                        V72                        V73 
     primary cells, normal      primary cells, normal      primary cells, normal      primary cells, normal      primary cells, normal 
                       V74                        V75                        V76                        V77                        V78 
primary cells, DDC-treated primary cells, DDC-treated primary cells, DDC-treated primary cells, DDC-treated primary cells, DDC-treated 
                       V79                        V80                        V81                        V82                        V87 
primary cells, DDC-treated primary cells, DDC-treated primary cells, DDC-treated primary cells, DDC-treated      primary cells, normal 
                       V88                        V89 
     primary cells, normal      primary cells, normal 
Levels: metastatic tumor primary cells, DDC-treated primary cells, normal primary tumor

Can somebody please help subset my subset even further to now separate the adult liver from damaged liver which are all currently labelled as just liver as now I am struggling to make the correct comparisons!

Thank you in advance and apologies if any of the code is out of place/you need further information as I am new to this. I'd be happy to provide any further information! I have looked for a solution to this but as far as I can search I cannot find what I am looking for, so apologies if this has been answered before!

Many thanks!

 

GSE subsetting microarray • 1.3k views
ADD COMMENT
1
Entering edit mode
Axel Klenk ★ 1.0k
@axel-klenk-3224
Last seen 4 hours ago
UPF, Barcelona, Spain

Dear A,

like any subsetting in R, e.g.:

sub <- es[, es$source_name_ch1 == "liver" & es$description == "primary cells, normal"]

Rather a question for R-help or StackOverflow.

HTH,

 - axel

 

ADD COMMENT
0
Entering edit mode

Awesome! Thank you so much for clearing that up, and yes will save these R related questions for those forums. Many thanks again!

A

ADD REPLY

Login before adding your answer.

Traffic: 651 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6