rystanley / genepopedit

Simple and flexible manipulation of genomic data.
15 stars 4 forks source link

genepop_rubias #11

Closed EmiCarr closed 5 years ago

EmiCarr commented 5 years ago

Hi,

I am using genepopedit to convert a genepop to a rubias file. However, when I try to perform a mixture analysis, I have this error :

Error in check_refmix(reference, gen_start_col, "reference") : Column "repunit" must be a character vector. It is not in reference data frame

I made sure to check before converting my genepop that repunit was a character vector by using this script :

repunits_reference = c("GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","NFL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL","GSL") as.character(repunits_reference) is.character(repunits_reference)

genepop_rubias(genepop = "/Volumes/drobo2/emilie_carrier/all_samples_fev_2019/03-bad_samples_high_relatedness_sex_removed/population_assignment_files/rubias/filtered_bad_samples_and_high_relatedness_removed_sex_removed_m4_p70_a0.01_A0.05_H0.6_one_snp_without_balancing_selection_baseline.gen", sampletype = "reference", repunits = repunits_reference, path = "/Volumes/drobo2/emilie_carrier/all_samples_fev_2019/03-bad_samples_high_relatedness_sex_removed/population_assignment_files/rubias/")

I tried running the example file from rubias to see if there was anything wrong with this package and it seems to work. Have you seen this problem before?

Thanks in advance!

NickJeff13 commented 5 years ago

Hi, I have not seen that error before, is it possible to share your data or a subset of it and I can try to troubleshoot? If so you can email it to nick.jeffery@dfo-mpo.gc.ca

NickJeff13 commented 5 years ago

There is an issue with the genepop_rubias function removing the first 2 loci for some reason, I'll push a fix to this which should help with running the rubias mixture analysis.

EmiCarr commented 5 years ago

Ok, thanks a lot! Let me know when you are done with the fix.

Have a nice day,

Emilie

Le jeu. 23 mai 2019 à 11:42, Nick Jeffery notifications@github.com a écrit :

There is an issue with the genepop_rubias function removing the first 2 loci for some reason, I'll push a fix to this which should help with running the rubias mixture analysis.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rystanley/genepopedit/issues/11?email_source=notifications&email_token=AL7LKHSWF4Z3XLU2PTGNQEDPW23N5A5CNFSM4HPEEBU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWCUKEA#issuecomment-495273232, or mute the thread https://github.com/notifications/unsubscribe-auth/AL7LKHV7NPI3WN5AKFBWPUTPW23N5ANCNFSM4HPEEBUQ .

NickJeff13 commented 5 years ago

Ok I made the fix, try reinstalling genepopedit, run the genepop_rubias function, and see if it runs in rubias.