如何解决rmarkdown围嘴文件解析错误?

时间:2020-10-24 15:10:20

标签: r-markdown bookdown bibtex

我在使用rmarkdown / bookdown从PubMed下载的围兜条目时遇到问题。

例如:

@article{retterer1,
  Address = {GeneDx, Gaithersburg, Maryland, USA.},
  Address1 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address2 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address3 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address4 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address5 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address6 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address7 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address8 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address9 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address10 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address11 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address12 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address13 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address14 = {GeneDx, Gaithersburg, Maryland, USA.},
  Address15 = {GeneDx, Gaithersburg, Maryland, USA.},
  Auid = {ORCID: 0000000152522001},
  Author = {Retterer, Kyle and Scuffins, Julie and Schmidt, Daniel and Lewis, Rachel and Pineda-Alvarez, Daniel and Stafford, Amanda and Schmidt, Lindsay and Warren, Stephanie and Gibellini, Federica and Kondakova, Anastasia and Blair, Amanda and Bale, Sherri and Matyakhina, Ludmila and Meck, Jeanne and Aradhya, Swaroop and Haverfield, Eden},
  Crdt = {2014/10/31 06:00},
  Date = {2015 Aug},
  Date-Added = {2019-03-06 11:53:53 -0500},
  Date-Modified = {2019-03-07 10:58:07 -0500},
  Dcom = {20160601},
  Dep = {20141106},
  Doi = {10.1038/gim.2014.160},
  Edat = {2014/10/31 06:00},
  Issn = {1530-0366 (Electronic); 1098-3600 (Linking)},
  Jid = {9815831},
  Journal = {Genet Med},
  Jt = {Genetics in medicine : official journal of the American College of Medical Genetics},
  Language = {eng},
  Lid = {10.1038/gim.2014.160 {$[$}doi{$]$}},
  Lr = {20181113},
  Mh = {Algorithms; Cohort Studies; Comparative Genomic Hybridization/*methods; Computational Biology/*methods; DNA/analysis/blood/genetics; *DNA Copy Number Variations; *Exome; Genetic Variation; High-Throughput Nucleotide Sequencing/methods; Humans},
  Mhda = {2016/06/02 06:00},
  Month = {Aug},
  Number = {8},
  Own = {NLM},
  Pages = {623--629},
  Phst = {2014/06/19 00:00 {$[$}received{$]$}; 2014/10/01 00:00 {$[$}accepted{$]$}; 2014/10/31 06:00 {$[$}entrez{$]$}; 2014/10/31 06:00 {$[$}pubmed{$]$}; 2016/06/02 06:00 {$[$}medline{$]$}},
  Pii = {gim2014160},
  Pl = {United States},
  Pmid = {25356966},
  Pst = {ppublish},
  Pt = {Journal Article},
  Rn = {9007-49-2 (DNA)},
  Sb = {IM},
  Status = {MEDLINE},
  Title = {Assessing copy number from exome sequencing and exome array CGH based on CNV spectrum in a large clinical cohort.},
  Volume = {17},
  Year = {2015},
  Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAhLi4vLi4vcGFwZXJzL3JldHRlcmVyMjAxNWFhMDAucGRmTxEBVgAAAAABVgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAAAAAAEJEAAH/////FHJldHRlcmVyMjAxNWFhMDAucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAgACAAAKIGN1AAAAAAAAAAAAAAAAAAZwYXBlcnMAAgApLzpVc2VyczpkYXluZTpwYXBlcnM6cmV0dGVyZXIyMDE1YWEwMC5wZGYAAA4AKgAUAHIAZQB0AHQAZQByAGUAcgAyADAAMQA1AGEAYQAwADAALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASACdVc2Vycy9kYXluZS9wYXBlcnMvcmV0dGVyZXIyMDE1YWEwMC5wZGYAABMAAS8AABUAAgAM//8AAAAIAA0AGgAkAEgAAAAAAAACAQAAAAAAAAAFAAAAAAAAAAAAAAAAAAABog==},
  Bdsk-Url-1 = {https://doi.org/10.1038/gim.2014.160}}

@article{retterer2,
  Author = {Retterer, Kyle and Scuffins, Julie and Schmidt, Daniel and Lewis, Rachel and Pineda-Alvarez, Daniel and Stafford, Amanda and Schmidt, Lindsay and Warren, Stephanie and Gibellini, Federica and Kondakova, Anastasia and Blair, Amanda and Bale, Sherri and Matyakhina, Ludmila and Meck, Jeanne and Aradhya, Swaroop and Haverfield, Eden},
  Journal = {Genet Med},
  Month = {Aug},
  Number = {8},
  Pages = {623--629},
  Title = {Assessing copy number from exome sequencing and exome array CGH based on CNV spectrum in a large clinical cohort.},
  Volume = {17},
  Year = {2015}}
  
@article{yates,
    Address = {GeneDx, Gaithersburg, Maryland, USA.},
    Address1 = {GeneDx, Gaithersburg, Maryland, USA.},
    Address2 = {GeneDx, Gaithersburg, Maryland, USA.},
    Address3 = {GeneDx, Gaithersburg, Maryland, USA.},
    Address4 = {GeneDx, Gaithersburg, Maryland, USA.},
    Address5 = {GeneDx, Gaithersburg, Maryland, USA.},
    Address6 = {GeneDx, Gaithersburg, Maryland, USA.},
    Address7 = {GeneDx, Gaithersburg, Maryland, USA.},
    Address8 = {GeneDx, Gaithersburg, Maryland, USA.},
    Author = {Yates, Carin L and Monaghan, Kristin G and Copenheaver, Deborah and Retterer, Kyle and Scuffins, Julie and Kucera, Cathlin R and Friedman, Bethany and Richard, Gabriele and Juusola, Jane},
    Crdt = {2017/04/21 06:00},
    Date = {2017 Oct},
    Date-Added = {2019-04-18 10:49:46 -0400},
    Date-Modified = {2019-04-18 18:11:17 -0400},
    Dcom = {20180604},
    Dep = {20170420},
    Doi = {10.1038/gim.2017.31},
    Edat = {2017/04/21 06:00},
    Issn = {1530-0366 (Electronic); 1098-3600 (Linking)},
    Jid = {9815831},
    Journal = {Genet Med},
    Jt = {Genetics in medicine : official journal of the American College of Medical Genetics},
    Language = {eng},
    Lid = {10.1038/gim.2017.31 {$[$}doi{$]$}},
    Lr = {20181113},
    Mh = {Abortion, Induced; Exome/genetics; Female; Fetal Death/etiology; Fetal Development/*genetics; Fetus/diagnostic imaging; Humans; Male; Mutation; Phenotype; Pregnancy; Prenatal Diagnosis/*methods; Sequence Analysis, DNA/methods; Ultrasonography; Ultrasonography, Prenatal; Whole Exome Sequencing/methods},
    Mhda = {2018/06/05 06:00},
    Month = {Oct},
    Number = {10},
    Own = {NLM},
    Pages = {1171--1178},
    Phst = {2016/09/30 00:00 {$[$}received{$]$}; 2017/02/08 00:00 {$[$}accepted{$]$}; 2017/04/21 06:00 {$[$}pubmed{$]$}; 2018/06/05 06:00 {$[$}medline{$]$}; 2017/04/21 06:00 {$[$}entrez{$]$}},
    Pii = {gim201731},
    Pl = {United States},
    Pmid = {28425981},
    Pst = {ppublish},
    Pt = {Journal Article},
    Sb = {IM},
    Status = {MEDLINE},
    Title = {Whole-exome sequencing on deceased fetuses with ultrasound anomalies: expanding our knowledge of genetic disease during fetal development.},
    Volume = {19},
    Year = {2017},
    Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxAeLi4vLi4vcGFwZXJzL3lhdGVzMjAxN2FhMDAucGRmTxEBSAAAAAABSAACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAAAAAAEJEAAH/////EXlhdGVzMjAxN2FhMDAucGRmAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAAAgACAAAKIGN1AAAAAAAAAAAAAAAAAAZwYXBlcnMAAgAmLzpVc2VyczpkYXluZTpwYXBlcnM6eWF0ZXMyMDE3YWEwMC5wZGYADgAkABEAeQBhAHQAZQBzADIAMAAxADcAYQBhADAAMAAuAHAAZABmAA8AGgAMAE0AYQBjAGkAbgB0AG8AcwBoACAASABEABIAJFVzZXJzL2RheW5lL3BhcGVycy95YXRlczIwMTdhYTAwLnBkZgATAAEvAAAVAAIADP//AAAACAANABoAJABFAAAAAAAAAgEAAAAAAAAABQAAAAAAAAAAAAAAAAAAAZE=},
    Bdsk-Url-1 = {https://doi.org/10.1038/gim.2017.31}}

在上面,@retterer1给出了PubMed记录,而@retterer2给出了从BibDesk手动复制的“最小”引用记录。引用@retterer1时,rmarkdown / bookdown不会标识日期,而是使用n.d建立引用。 (无日期)。最小引用被正确解析。反正有解决此问题的方法吗?不编辑我的围嘴文件?我猜问题出在完整记录的“日期”字段中?

注意,这不是单个条目问题。我在PubMed上下载的所有引文中都有它。

一个最小示例,带有附加引用以显示该问题:

---
title: "R Notebook"
output:
  html_document:
    df_print: paged
editor_options:
  chunk_output_type: inline
bibliography: test.bib
biblio-style: apalike
link-citations: yes
---

Test it out [@retterer2; @yates].

enter image description here

0 个答案:

没有答案