vers <- paste("R package version", meta$Version)

citHeader("If using the rooted SPR distance, cite Whidden et al. (2013); ",
          "for the unrooted SPR distance, it's Whidden and Matsen (2019).",
          "A citation to the R package (Smith 2019) would also be welcome.")

bibentry(
  bibtype = "Article",
  key = "Whidden2013",
  title = "Fixed-Parameter Algorithms for Maximum Agreement Forests",
  author = c(as.person("Chris Whidden"),
             as.person("RG Beiko"),
             as.person("N Zeh")),
  year = 2013,
  journal = "SIAM Journal on Computing",
  volume = 42,
  pages = "1431-–1466",
  doi = "10.1137/110845045",
  textVersion = paste(
    "Whidden C, Beiko RG, Zeh N (2013).",
    "Fixed-Parameter Algorithms for Maximum Agreement Forests.",
    "SIAM Journal on Computing 42:1431–1466.",
    "doi:10.1137/110845045"
  )
)

bibentry(bibtype = "Article",
         key = "Whidden2019",
         title = "Calculating the Unrooted Subtree-Prune-and-Regraft Distance.",
         author = c(as.person("Chris Whidden"),
                    as.person("Frederick A. Matsen")),
         journal = "IEEE/ACM Transactions on Computational Biology and Bioinformatics",
         issue = 3,
         volume = 16,
         pages = "898--911",
         year = 2019,
         doi = "10.1109/TCBB.2018.2802911",

         textVersion = paste0("Whidden & Matsen (2019). Calculating the ",
                              "Unrooted Subtree Prune-and-Regraft Distance. ",
                              "IEEE/ACM Transactions on Computational Biology ",
                              " and Bioinformatics 16:898-911. ",
                              "doi:10.1109/TCBB.2018.2802911"))

bibentry(
  bibtype = "Article",
  key = "Whidden2014",
  title = "Supertrees based on the subtree prune-and-regraft distance",
  author = c(as.person("Chris Whidden"),
             as.person("N Zeh"),
             as.person("RG Beiko")),
  year = 2014,
  journal = "Systematic Biology",
  volume = 63,
  pages = "566--581",
  doi = "10.1093/sysbio/syu023",
  textVersion = paste(
    "Whidden C, Zeh N, Beiko RG (2014).",
    "Supertrees based on the subtree prune-and-regraft distance.",
    "Systematic Biology 63:566-581.",
    "doi:10.1093/sysbio/syu023"
  )
)

bibentry(bibtype = "Manual",
         key = "Smith2019",
         title = "TBRDist: Rearrangement Distances Between Phylogenetic Trees",
         author = as.person("Martin R. Smith"),
         note = vers,
         publisher = "Comprehensive R Archive Network",
         year = 2019,
         doi = "10.5281/zenodo.3548333",

         textVersion =
         paste0("Smith (2019). TBRDist: Rearrangement Distances ",
                "Between Phylogenetic Trees. ", vers,
                ". Comprehensive R Archive Network. ",
                "doi: 10.5281/zenodo.3548333"))
