atakanekiz / CIPR-Package

Cluster Identity Predictor (R package implementation)
18 stars 3 forks source link

Adding column gene to avgexp causes "Coercing LHS to a list" #2

Closed denvercal1234GitHub closed 3 years ago

denvercal1234GitHub commented 3 years ago

Hi there,

Thank you for the package!

I aim to use the Standard all-genes correlation method, but I encountered an error below. Would you mind advising me how to proceed?

Thank you for your help!

When I added a column gene to avgexp object, using the rownames of the output of AverageExpression(), it says "Coercing LHS to a list".

avgexp$gene <- rownames(avgexp)

When I then check the colnames(avgexp), it says NULL, and the output of avgexp is now a list of individual element and not a dataframe, shown below:

Screen Shot 2021-04-05 at 9 34 39 PM

As a result, when I ran CIPR using input_dat = avgexp, it produces an error:

Screen Shot 2021-04-05 at 9 36 33 PM
denvercal1234GitHub commented 3 years ago

Nevermind. I solved the issue by including as.data.frame() to the code below:

avgexp <- as.data.frame(avgexp$RNA) 
avgexp$gene <- rownames(avgexp)

BTW, it says select_() was deprecated in dplyr 0.7.0. when running CIPR