Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdcCorPlot seems to remove SolidTissueNormal samples #16

Open
liyezhou opened this issue May 22, 2020 · 1 comment
Open

gdcCorPlot seems to remove SolidTissueNormal samples #16

liyezhou opened this issue May 22, 2020 · 1 comment

Comments

@liyezhou
Copy link

liyezhou commented May 22, 2020

When I try to run the following code taken from the help passage of gdcCorPlot,

genes <- c('ENSG00000000938','ENSG00000000971','ENSG00000001036',
           'ENSG00000001084','ENSG00000001167','ENSG00000001460')

samples <- c('TCGA-2F-A9KO-01', 'TCGA-2F-A9KP-01', 
             'TCGA-2F-A9KQ-01', 'TCGA-2F-A9KR-11', 
             'TCGA-2F-A9KT-11', 'TCGA-2F-A9KW-11')

metaMatrix <- data.frame(sample_type=rep(c('PrimaryTumor',
                                           'SolidTissueNormal'),each=3),
                         sample=samples,
                         days_to_death=seq(100,600,100),
                         days_to_last_follow_up=rep(NA,6))

rnaExpr <- matrix(c(2.7,7.0,4.9,6.9,4.6,2.5,
                    0.5,2.5,5.7,6.5,4.9,3.8,
                    2.1,2.9,5.9,5.7,4.5,3.5,
                    2.7,5.9,4.5,5.8,5.2,3.0,
                    2.5,2.2,5.3,4.4,4.4,2.9,
                    2.4,3.8,6.2,3.8,3.8,4.2),6,6)
rownames(rnaExpr) <- genes
colnames(rnaExpr) <- samples
gdcCorPlot(gene1 = 'ENSG00000000938', 
           gene2    = 'ENSG00000001084',
           rna.expr = rnaExpr,
           metadata = metaMatrix)

I get the following error message

`geom_smooth()` using formula 'y ~ x'
Warning messages:
1: Use of `corDa$lncDa` is discouraged. Use `lncDa` instead. 
2: Use of `corDa$pcDa` is discouraged. Use `pcDa` instead. 
3: Use of `corDa$lncDa` is discouraged. Use `lncDa` instead. 
4: Use of `corDa$pcDa` is discouraged. Use `pcDa` instead. 
5: Removed 3 rows containing missing values (geom_point). 

and the output is as follows, which seem to have remove all three samples corresponding to SolidTissueNormal.
image

@liyezhou
Copy link
Author

I've read through your source code and It seems the problem is that in the ggplot function where

scale_colour_manual(breaks = sampleType, 
                      values = c('chocolate1', 'blue')) +

should rather be

scale_colour_manual(breaks = levels(sampleType), 
                      values = c('chocolate1', 'blue')) +

liyezhou added a commit to liyezhou/GDCRNATools that referenced this issue May 22, 2020
see rli012#16 for the issue that I've found. Here I've attempted to fix the issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant