View source: R/genemapper2df.R
genemapper2df | R Documentation |
This function allows the user to quickly convert multiple txt files of microsatellite genotyping data from GeneMapper to a csv or a data.frame. It was tested with txt files produced by GeneMapper v4.0 up to v6.0.
genemapper2df( folder_name, export_name = "genemapper_export.csv", export_option = "csv" )
folder_name |
a folder where all the .txt files generated by GeneMapper are stored. |
export_name |
the name of the exported csv file. |
export_option |
whether to export a csv file (option "csv") or a data.frame in the R Environment (option "R"). |
a single csv file or a data.frame
Nikolaos Tourvas
## Not run: # Export csv file for use in GenAlEx genemapper2df(folder_name = "...", export_name = "my_data", export_option = "csv") # Create genind object df <- genemapper2df(folder_name = "...", export_option = "R") obj <- loci2genind(as.loci(df)) # For genind objects you will probably want to import population data as well. # This can be done in the following way. strata(obj) <- strata_df #provide a data.frame with population strata (e.g. Year, Plot) setPop(obj) <- ~Year/Plot #set the appropriate population hierachy for the analysis ## Note that you can change population hierarchy between analyses using the previous command. ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.