kkdey / CountClust

A R package for Grade of Membership model and Visualization of counts data:
31 stars 11 forks source link

Error in structureGGplot() when there is one sample for each annotation label #13

Closed kkdey closed 8 years ago

kkdey commented 8 years ago

Got this error for a case with 3 samples for 3 labels (G1, S and G2) each having one sample each.

omega topic document 1 2 3 G1.counts 1.0000000 2.109040e-08 2.143157e-08 S.counts 1.0000000 2.448328e-08 2.408544e-08 G2M.counts 0.9999999 2.819789e-08 2.644736e-08

annotation sample_id tissue_label 1 X1 G1 2 X2 S 3 X3 G2M

Then StructureGGplot gave the following error:

Error in apply(temp_df, 1, which.max) : dim(X) must have a positive length

davidroberson commented 8 years ago

Is there a resolution for this...having a similar issue.

Thanks

jhsiao999 commented 8 years ago

Kushal: I just submitted a pull request for this issue. I included a test-run example in structureGGplot(), you can give it a try and see if the code works.

David: Soon as we finish the test-run, the code will be updated to include the changes. Thanks for the input!

kkdey commented 8 years ago

Merged the pull request and did a test run.. it works!! code is updated now...Thanks Joyce

David: Let us know if things work okay now. Thanks for the suggestion!