Hi everyone,
this is just an information about current dartR developments.
You might have noticed that dartR was not on CRAN for about 2 weeks, but the good news is, we are back.
The new version is 2.7.2 (and will be available as binaries in the next days), but you can install the version from github via:
install_github("green-striped-gecko/dartR")
and then you can run
gl.install.vanilla.dartR()
to get all the additional packages (if you upgrade you should have 95% already installed).
The new version was necessary due to some imcompatibilities of other pacakges, which needed to be rectified (e.g. ggtern for ternary plots had issues).
In terms of new functions there are not many, but quite a few new once:
gl.assign.grm: allows for assignment to populations using a genetic relatedness matrix
gl.ld.distance: Plots linkage disequilibrium against distance by population disequilibrium patterns
gl.ld.haplotype: Visualizes patterns of linkage disequilibrium and identification of haplotypes
gl.sfs (there is no longer gl2sfs (because it is no longer needed). Allows to calculate (multi)dimensional site frequency spectra)
gl.spatial.autoCorr: Spatial autocorrelation following Smouse and Peakall 1999
gl2bpp: Converts a genlight object into a format suitable for input to the BPP program
and another 20 functions had some minor bug fixes.
There is one major development under way (but is not in effect yet), as we started to develop our own class (read genlight objects will become dartR objects derived from genlight).
The means nothing will change and all your code will be backward compatible, but we want to deviate from genlight objects having a more defined data object called dartR (name not final yet).
The idea here is for example the genlight object has a slot position that is used for the position of snps on the chromosomes, but we have quite a few functions that use the position of SNPs within the reads and this should be in its own slot at some stage. We promise dartR will always work on genlight objects, which is the core of our package, but for future development (e.g. for being able to include reference genomes and additional data) we will extend the genlight object. If you want to have a glimpse you can use
class(yourgenlightobject) <- "dartR"
yourgenlightobject
and you see the new summary we are working on.
A nice side effect is that we can customise the functions and therefore you can now subset your dartR object also for loci using: gl[1:7, 1:8] as this also subsets the metadata for loci and individuals correctly.
What the future will bring is not decided, but we are
working on some cool functions to allow the estimation of effective population
size using snp data, some functions to support captive breeding (e.g. identify
offsprings and suggest breeding pairs). If you have suggestions please post them here so we can discuss them. If you have some code lying around which you think would be good as a function send an email to us.
Also we plan to have some workshops in the coming year, so in case you would be interested to have one at your institution, just shoot me or Luis an email.
Thats for now
Merry Xmas and all the best for the coming year,
Bernd & Luis & Carlo & Arthur & Olly
==============================================================================
Dr Bernd Gruber )/_
_.--..---"-,--c_
Professor Ecological Modelling \|..' ._O__)_
Tel: (02) 6206 3804 ,=. _.+ _ \..--( /
Fax: (02) 6201 2328 \\.-''_.-' \ ( \_
Institute for Applied Ecology `''' `\__ /\
Faculty of Science and Technology ')
University of Canberra ACT 2601 AUSTRALIA
Email: bernd....@canberra.edu.au
WWW: bernd-gruber
Australian Government Higher Education Provider Number CRICOS #00212K
NOTICE &
DISCLAIMER: This email and any files transmitted with it may contain
confidential or copyright material and are for the attention of the addressee
only. If you have received this email in error please notify us by email
reply and delete it from your system. The University of Canberra accepts
no liability for any damage caused by any virus transmitted by this email.
==============================================================================
Error: package ‘dartR.data’ required by ‘dartR’ could not be found
In addition: Warning message:
package ‘dartR’ was built under R version 4.2.2
(.packages())
[1] "dplyr" "ggplot2" "adegenet" "ade4" "fs" "versions" "stats" "graphics" "grDevices" "utils"
[11] "datasets" "methods" "base"
> versions::install.versions("dartR.data", version="1.0.1", lib = "C:/Users/scatag/AppData/Local/R/win-library/4.2_dartR_v2.7.2")
trying URL 'https://MRAN.revolutionanalytics.com/snapshot/2023-01-13/bin/windows/contrib/4.2/dartR.data_1.0.2.zip'
Content type 'application/zip' length 1706523 bytes (1.6 MB)
downloaded 1.6 MB
package ‘dartR.data’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\scatag\AppData\Local\Temp\RtmpGkEgPj\downloaded_packages
> library(dartR.data, lib.loc = "C:/Users/scatag/AppData/Local/R/win-library/4.2_dartR_v2.7.2")
Warning message:
package ‘dartR.data’ was built under R version 4.2.2
# Now try again installing dartR 2.7.2
> versions::install.versions("dartR", version="2.7.2", lib = "C:/Users/scatag/AppData/Local/R/win-library/4.2_dartR_v2.7.2")
trying URL 'https://MRAN.revolutionanalytics.com/snapshot/2023-01-23/bin/windows/contrib/4.2/dartR_2.7.2.zip'
Content type 'application/zip' length 3944632 bytes (3.8 MB)
downloaded 3.8 MB
package ‘dartR’ successfully unpacked and MD5 sums checked
> library(dartR, lib.loc = "C:/Users/scatag/AppData/Local/R/win-library/4.2_dartR_v2.7.2")
Registered S3 method overwritten by 'pegas':
method from
print.amova ade4
Registered S3 method overwritten by 'GGally':
method from
+.gg ggplot2
Registered S3 method overwritten by 'genetics':
method from
[.haplotype pegas
Error: package or namespace load failed for ‘dartR’:
.onAttach failed in attachNamespace() for 'dartR', details:
call: gsub_(st$close, st$open, text, fixed = TRUE, useBytes = TRUE)
error: could not find function "gsub_"
In addition: Warning message:
package ‘dartR’ was built under R version 4.2.2
# TRY installing dartR.data with install.packages()
install.packages("dartR.data")
Installing package into ‘C:/Users/scatag/AppData/Local/R/win-library/4.2’
(as ‘lib’ is unspecified)
trying URL 'http://cran.rstudio.com/bin/windows/contrib/4.2/dartR.data_1.0.2.zip'
Content type 'application/zip' length 1706346 bytes (1.6 MB)
downloaded 1.6 MB
package ‘dartR.data’ successfully unpacked and MD5 sums checked
library(dartR.data)
Loading required package: adegenet
Loading required package: ade4
/// adegenet 2.1.7 is loaded ////////////
> overview: '?adegenet'
> tutorials/doc/questions: 'adegenetWeb()'
> bug reports/feature requests: adegenetIssues()
Warning message:
package ‘dartR.data’ was built under R version 4.2.2
# check library path
.libPaths()
# --> "C:/Users/scatag/AppData/Local/R/win-library/4.2" ; "C:/Program Files/R/R-4.2.1/library"
# Now try again installing dartR 2.7.2
versions::install.versions("dartR", version="2.7.2", lib = "C:/Users/scatag/AppData/Local/R/win- library/4.2_dartR_v2.7.2")
trying URL 'https://MRAN.revolutionanalytics.com/snapshot/2023-01-24/bin/windows/contrib/4.2/dartR_2.7.2.zip'
Content type 'application/zip' length 3947725 bytes (3.8 MB)
downloaded 3.8 MB
package ‘dartR’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\scatag\AppData\Local\Temp\Rtmpa0LVxw\downloaded_packages
library(dartR, lib.loc = "C:/Users/scatag/AppData/Local/R/win-library/4.2_dartR_v2.7.2")
Loading required package: ggplot2
Loading required package: dplyr
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
Registered S3 method overwritten by 'pegas':
method from
print.amova ade4
Registered S3 method overwritten by 'GGally':
method from
+.gg ggplot2
Registered S3 method overwritten by 'genetics':
method from
[.haplotype pegas
Error: package or namespace load failed for ‘dartR’:
.onAttach failed in attachNamespace() for 'dartR', details:
call: gsub_(st$close, st$open, text, fixed = TRUE, useBytes = TRUE)
error: could not find function "gsub_"
In addition: Warning messages:
1: package ‘dartR’ was built under R version 4.2.2
2: package ‘ggplot2’ was built under R version 4.2.2
packageVersion("dartR") # ‘new dartR version! :)
[1] ‘2.7.2’
detach("package:dartR") # ‘2.7.2’ = developer version of 14 March 2023!!!! :) YES!!! :)
Error in detach("package:dartR") : invalid 'name' argument
packageVersion("dartR")
[1] ‘2.7.2’
# Try laoding another dartR version
library(dartR, lib.loc = "C:/Users/scatag/AppData/Local/R/win-library/4.2_developer_versions_lib") # Version 2.1.4 = previous developer version
**** Welcome to dartR [Version 2.1.4 ] ****
Be aware that owing to CRAN requirements and compatibility reasons not all functions of the package may run after the basic installation, as some packages could still be missing. Hence for a most enjoyable experience we recommend to run the function
gl.install.vanilla.dartR()
This installs all missing and required packages for your version of dartR.
For citation information please use:
citation('dartR')
Global verbosity is set to: 2
**** Have fun using dartR! ****
packageVersion("dartR") # ‘2.1.4’ = previous developer version! :)
[1] ‘2.1.4’
detach("package:dartR")
# Load the previous CRAN established dartR version (2.0.4) (2 Aug 2022)
library(dartR, lib.loc = "C:/Users/scatag/AppData/Local/R/win-library/4.2")
**** Welcome to dartR [Version 2.0.4 ] ****
Be aware that owing to CRAN requirements and compatibility reasons not all functions of the package may run after the basic installation, as some packages could still be missing. Hence for a most enjoyable experience we recommend to run the function
gl.install.vanilla.dartR()
This installs all missing and required packages for your version of dartR.
For citation information please use:
citation('dartR')
Global verbosity is set to: 2
**** Have fun using dartR! ****
packageVersion("dartR") # ‘2.0.4’ - YES!! :)
[1] ‘2.0.4’
detach("package:dartR")
(.packages()) # dartR is not loaded anymore
[1] "dplyr" "ggplot2" "dartR.data" "adegenet" "ade4" "stats" "graphics" "grDevices"
[9] "utils" "datasets" "methods" "base"
library(dartR, lib.loc = "C:/Users/scatag/AppData/Local/R/win-library/4.2_dartR_v2.7.2")
Error: package or namespace load failed for ‘dartR’:
.onAttach failed in attachNamespace() for 'dartR', details:
call: gsub_(st$close, st$open, text, fixed = TRUE, useBytes = TRUE)
error: could not find function "gsub_"
In addition: Warning message:
package ‘dartR’ was built under R version 4.2.
(.packages())
[1] "dplyr" "ggplot2" "dartR.data" "adegenet" "ade4" "stats" "graphics" "grDevices"
[9] "utils" "datasets" "methods" "base"
packageVersion("dartR")
[1] ‘2.7.2
> library(dartR, lib.loc = "C:/Users/scatag/AppData/Local/R/win-library/4.2_older_package_versions_lib")
**** Welcome to dartR ****
Be aware that owing to CRAN requirements and compatibility reasons not all functions of the packages may run yet, as some dependencies could be missing. Hence for a most enjoyable experience we recommend to run the function
gl.install.vanilla.dartR()
This installs all missing and required packages for your version of dartR.
For citation information please use:
citation('dartR')
**** Have fun using dartR! ****
Attaching package: ‘dartR’
The following object is masked from ‘package:dartR.data’:
> packageVersion("dartR") # dartR Version 1.9.6 --> yes!
[1] ‘1.9.6’
> (.packages())
[1] "dartR" "dplyr" "ggplot2" "dartR.data" "adegenet" "ade4" "stats" "graphics"
[9] "grDevices" "utils" "datasets" "methods" "base"
> detach("package:dartR")
> (.packages())
[1] "dplyr" "ggplot2" "dartR.data" "adegenet" "ade4" "stats" "graphics" "grDevices"
[9] "utils" "datasets" "methods" "base"