elmacartney / Postcop_MA

0 stars 0 forks source link

Final analysis tasks #8

Closed elmacartney closed 1 year ago

elmacartney commented 1 year ago
mlagisz commented 1 year ago

@elmacartney - would you be able to pint me to the code file and line numbers where I should look for your phylo tree please? thank you!

elmacartney commented 1 year ago

@@. @.> the Phylo tree is Fig. 1 (labeled in the RMD) starting line 233 (the tree is loadable in the 'settling up chunk')

I've also been having issues with Fig. 2 and Fig. 3 if you wouldn't mind taking a look at them/trying to make them better? Fig. 2 (line 268) is the alluvial plot of the 4 moderators, but it keeps adding heaps of 'hair-like' connections that don't actually exist between moderators, and previous code to modify the orchard plots (Fig. 3; line 354) to make it clearer also doesn't seem to work anymore.

Thank you!!

On Fri, Mar 31, 2023 at 1:46 PM Malgorzata Lagisz @.***> wrote:

@elmacartney https://github.com/elmacartney - would you be able to pint me to the code file and line numbers where I should look for your phylo tree please? thank you!

— Reply to this email directly, view it on GitHub https://github.com/elmacartney/Postcop_MA/issues/8#issuecomment-1491805696, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATGFCZWDMEXF2FH25GEBMGLW6273HANCNFSM6AAAAAAWOL7FDA . You are receiving this because you were mentioned.Message ID: @.***>

itchyshin commented 1 year ago

@elmacartney - I will first read the MS and then, add publication bias & sensitivity stuff (along with fixing the function you pointed out earlier).

mlagisz commented 1 year ago

@elmacartney - the ggtree code did not run for me at all initially. I had to update my R and R studio and the supportd R versions clashed. I then re-installed and loaded ape package and then ggtree package. The ggtree is tricky - you have to install from the bioconductor site and match the version to your R. I had to go:

if (!require("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install(version = '3.16')
BiocManager::install("ggtree", force = TRUE)

library(ape) library(ggtree)

The tree-plotting code seemed to work after this.

elmacartney commented 1 year ago

Thanks @mlagisz I'll try that.

have you managed to take a look at the other figures? I just pulled but I didn't see any changes. Otherwise, happy to send around the manuscript and then you both will get more of an idea about what code I need help with.

mlagisz commented 1 year ago

@elmacartney - I just tested Figure 1 code. For other figures, it will be best to have a look at whole draft results section + figures in one go. Thank you!

elmacartney commented 1 year ago

Updating todo list of things to think about once I send out the manuscript so far:

itchyshin commented 1 year ago

@elmacartney - thanks for putting together the list - I look forward to receiving the MS! I will look into lnCVR - we need mostly continuous values, but I think it is mostly proportion or % - lnCVR does not work on proportion (%) data as the mean determines variance for such data.

KyleMorrison99 commented 1 year ago

@elmacartney I will cross-check the moderator categories. I will cross-check 20 % as before. Also, I presume it is the updated file in the repository?

elmacartney commented 1 year ago

@KyleMorrison99 thanks. I think it’s best to check all the papers for these two moderators just to make sure, it shouldn’t take too long but there’s no rush with this. The manuscript has a description of the variation categories. Just pull from GH but please make sure to create a new data_raw file rather than modify the one in there. The moderator column is called PC_variation_cause2 Sent from my iPhoneOn 14 Apr 2023, at 12:31 am, KyleMorrison99 @.***> wrote: @elmacartney I will cross-check the moderator categories. I will cross-check 20 % as before. Also, I presume it is the updated file in the repository?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

itchyshin commented 1 year ago

@elmacartney a few things to do added

itchyshin commented 1 year ago

@elmacartney - N2 was inaccurately caculated now fixed

# TODO - this was wrong - should be N/2 for dependent samples
#df4$N2 <- ifelse(df4$N_dependent == "dependent", df4$N, df4$N/2)
df4$N2 <- ifelse(df4$N_dependent == "dependent", df4$N/2, df4$N)

# this is the reason - R error message is usually useful
# so I am not sure how you can calculate this manually - it is not possible to get vi when less than 3 - we need to make some assumption - so 38th one we assumed N = 3.5 (the smallest in the dataset and this needs to written in the MS
> zr <- escalc(measure = "ZCOR", ni = df4$N2, ri = df4$effect_size2)
Warning message:
Cannot estimate the sampling variance when ni <= 3. 

The issue for N2 is fixed - please run models

itchyshin commented 1 year ago

@itchyshin to do

elmacartney commented 1 year ago

Hi @itchyshin I hope you're feeling okay.

Just wondering if you've had a chance to look at some of the publication bias and sensitivity analysis code? Most of the analysis is done other than the things mentioned above. I have cleaned up a lot of the code and the new analysis file is called analysis.rmd.

I am in the USA for the next 2 weeks so won't really have a chance to work on it over that time so no rush.

itchyshin commented 1 year ago

@elmacartney

Sorry I have not looked at it yet - I am behind on many things.

My teaching start this week so I am busy next two weeks especially but hopefully, I will look at these before you return.

Can you share with us the current MS so I can see what needs to be added etc. Also, it will be good to understand what extra analyses you added - I guess these are already in MS and the R code too? Thanks

itchyshin commented 1 year ago

@elmacartney for now, these 3 items above have been resolved - you need to make them nicer maybe. once I read the MS, I can think of whether we need more sensitivity analyses etc

elmacartney commented 1 year ago

Thanks @itchyshin I will add those in ASAP. The manuscript is basically written now so I'll post it in Slack once I've added the PB analysis etc