escamero / mirlyn

11 stars 3 forks source link

Problems running example code #1

Closed laura-vangalen closed 2 years ago

laura-vangalen commented 3 years ago

Hi, thanks very much for creating this package!

I'm having a few problems running the example code:

I'm also wondering whether it is possible to use multiple cores when running the mirl function?

Thanks again, this is a very helpful package.

Laura

bjmt commented 3 years ago

Dear Laura,

Thanks for your interest in the package! I have pushed some updates which should hopefully address everything you've mentioned.

I have also taken the liberty of adding a mc.cores option to mirl(). (Thanks for the idea!) Note that I had to change the code handling the random seed to do this, so mirl() will not be reproducible between this version and previous ones.

Let me know if you're still encountering any issues. Thanks for alerting us to these issues.

laura-vangalen commented 3 years ago

Thanks, that's great. The mirl function is now heaps faster. Would it also be possible to add multiple cores options to the alphadivDF, alphacone, and betamatPCA functions? My data set is quite large and is currently taking a very long time so it would help to speed things up if it's possible.

One other thing I found was that the alphadivDF function only works when taxa are the rows in the phyloseq object. Originally I had my taxa as columns (which is what the dada2 processing pipeline tutorial does) and that produced wacky results. Could be worth a mention in your tutorial.

The issues I mentioned seem to be fixed, although the "Generate visualization of PCA" code now seems to be having issues: > betamatPCAvis(betamatPCA_object, groups = c("A", "B", "C", "D", "E", "F"), reps = 100, colours = c("#000000", "#E69F00", "#0072B2", "#009E73", "#F0E442", "#D55E00"))

Error in .add_ind_groups(X, df, habillage) : 
  The number of active individuals is different from the length of the factor habillage. Please, remove the supplementary individuals in the variable habillage.

Thanks very much for your help

bjmt commented 3 years ago

Hi Laura,

Sorry about the late reply! I swear I thought I had replied after pushing an update to the package.. I just opened GitHub and noticed that that was not the case now sadly.

I've sped up alphadivDF() and betamatPCA(), as well as added an mc.cores option to alphacone(). Hopefully that helps.

As for the taxa are rows: thanks for letting us know. For now I've added a check inside of mirl(), but we will make it compatible with either column/row taxa in future.

Regarding the PCA code: are you using your own data? If so, you need to make sure the length of the groups and colours vectors are the same length as your number of samples, and that the number of reps is the same number as what you used in the preceding mirl() call.