Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
319 views
in Technique[技术] by (71.8m points)

DESeq2 - organizing data - count data with more columns than meta data row, remove TCGA IDs that don't match between datasets

I am in the process of running a DEA with DESeq2 with some lung squamous cell carcinoma data from Broad firehose. I have used the RNAseq data, raw counts for the count data, my metadata is generated from Broad firehose data on CNV. The two datasets are related by TCGA IDs, each data set contains matching IDs, but the raw counts data has several "extra" TCGA IDs that don't match/ exist in the metadata. counts length = 552, meta length = 501 I need to get my metadata and raw counts data in the same order and have the datasets contain the matching TCGA IDs and drop the IDs/ samples that don't match.

I've been trying to work around different ways to do this using, match and %in%, I can identify the positions where the raw count data do not have the same TCGA IDs as the metadata, but can't wrap my head around how to take the raw counts and drop the IDs/samples that do not match the samples in the metadata.

Any ideas would help on how to match up two data sets and eliminate row/ columns that don't match.

colnames(lusc_reads)
  [1] "TCGA-18-3406" "TCGA-18-3407" "TCGA-18-3408" "TCGA-18-3409" "TCGA-18-3410" 
rownames(lusc_meta)
  [1] "TCGA-60-2722" "TCGA-43-7657" "TCGA-58-A46N" "TCGA-NC-A5HL" "TCGA-63-A5MB"
match(colnames(lusc_reads), rownames(lusc_meta))
  [1] 318 265 114 372 353 150   8 287 215  57 199 268 239 179 164 249 383  17 274
question from:https://stackoverflow.com/questions/65914093/deseq2-organizing-data-count-data-with-more-columns-than-meta-data-row-remo

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...