hans / obsidian-citation-plugin

Obsidian plugin which integrates your academic reference manager with the Obsidian editor. Search your references from within Obsidian and automatically create and reference literature notes for papers and books.
MIT License
1.07k stars 80 forks source link

Plugin not displaying all citations in .bib file #91

Closed csducate closed 3 years ago

csducate commented 3 years ago

Problem

I have a citation that I am trying to make a literature note for, but it refuses to show up in the Citations dialogue box. I can see it in my .bib file, so it isn't a matter of updating, and I've even seen the Citations plugin refresh to get the most up-to-date version of the .bib file.

Expected behavior

Citations in my .bib file show up when I search for them.

What I have tried

Nothing works. The citation I want remains unseeable.

hans commented 3 years ago

Hi Caitlin, thanks for the thorough report. Would you mind sharing your .bib file so I can reproduce the issue on my end?

csducate commented 3 years ago

I'd be happy to, but apparently I cannot attach a .bib file to this comment. How can I get it to you?

pickleton89 commented 3 years ago

I have a similar issue. I just appended the .bib with .txt to upload @csducate All Papers.txt

vdca commented 3 years ago

I had a similar issue. In my case, the problem was driven by a duplicate bibtex key. The plugin would only find one of the duplicate entries, while the one I was looking for didn't show up. Removing the duplicates solved the problem.

csducate commented 3 years ago

Hi Caitlin, thanks for the thorough report. Would you mind sharing your .bib file so I can reproduce the issue on my end?

Yes, @hans! It took me this long to realize I could zip it and attach it....

The citation that just won't show up has the citekey CorrellRidgeway_2006. I have checked to see if I had a duplicate entry for it like @vdca had, but that doesn't seem to be my issue. And I just checked to confirm that that entry STILL won't show up through the citations plugin.

Obsidian.bib.zip

pickleton89 commented 3 years ago

I have a similar issue. I just appended the .bib with .txt to upload @csducate All Papers.txt

Any thoughts on what may be causing this issue? I have uninstalled and reinstalled plug in and still have issues. When it loads .bib file the plugin message is "Loaded library with 494 references." My guess that there may be a limitation on just the number of citations that can be loaded but not sure.

hans commented 3 years ago

Hi @pickleton89 , my apologies for the very long delay. Your .bib file seems to be full of LaTeX errors which are currently breaking our parser. I'll do some work to make our parser more resilient, but just out of curiosity -- what software is producing this .bib file? See an example entry below with

@article{Mubeen.Frontiers in Genetics.2019,
title = {{The Impact of Pathway Database Choice on Statistical Enrichment Analysis and Predictive Modeling}},
author = {Mubeen, Sarah and Hoyt, Charles Tapley and Gemünd, André and Hofmann-Apitius, Martin and Fröhlich, Holger and Domingo-Fernández, Daniel},
journal = {Frontiers in Genetics},
issn = {1664-8021},
doi = {10.3389/fgene.2019.01203},
pmid = {31824580},
abstract = {{Pathway-centric approaches are widely used to interpret and contextualize -omics data. However, databases contain different representations of the same biological pathway, which may lead to different results of statistical enrichment analysis and predictive models in the context of precision medicine. We have performed an in-depth benchmarking of the impact of pathway database choice on statistical enrichment analysis and predictive modeling. We analyzed five cancer datasets using three major pathway databases and developed an approach to merge several databases into a single integrative one: MPath. Our results show that equivalent pathways from different databases yield disparate results in statistical enrichment analysis. Moreover, we observed a significant dataset-dependent impact on the performance of machine learning models on different prediction tasks. In some cases, MPath significantly improved prediction performance and also reduced the variance of prediction performances. Furthermore, MPath yielded more consistent and biologically plausible results in statistical enrichment analyses. In summary, this benchmarking study demonstrates that pathway database choice can influence the results of statistical enrichment analysis and predictive modeling. Therefore, we recommend the use of multiple pathway databases or integrative ones.}},
pages = {1203},
volume = {10},
keywords = {\textasciicircumgraph,\textasciicircumGSEA,\textasciicircumInformatic,\textasciicircumnetwork,\textasciicircumpathway enrichment,\textasciicircumreactome,`machinelearning,`stats},
local-url = {file://localhost/Users/kiefer/Documents/Papers%20Library/2019/Frontiers%20in%20Genetics/Mubeen/Mubeen_Frontiers%20in%20Genetics_2019.pdf},
year = {2019}
}
hans commented 3 years ago

@csducate , thanks for sharing and my apologies for this slow response! The next release will have better error logging to allow you to do this yourself, but --

it looks like your reference manager software is putting out some invalid biblatex, but it's an easy fix. Just remove the extra ids fields which end in an underscore _ from the following lines in your file: 3872 (this is CorrellRidgeway_2006), 8310, and 17666.

pickleton89 commented 3 years ago

Hi @pickleton89 , my apologies for the very long delay. Your .bib file seems to be full of LaTeX errors which are currently breaking our parser. I'll do some work to make our parser more resilient, but just out of curiosity -- what software is producing this .bib file? See an example entry below with

  • spaces in the article citekey -- this is not allowed
  • lots of \textasciicircum commands missing a trailing space / {} characters.
@article{Mubeen.Frontiers in Genetics.2019,
title = {{The Impact of Pathway Database Choice on Statistical Enrichment Analysis and Predictive Modeling}},
author = {Mubeen, Sarah and Hoyt, Charles Tapley and Gemünd, André and Hofmann-Apitius, Martin and Fröhlich, Holger and Domingo-Fernández, Daniel},
journal = {Frontiers in Genetics},
issn = {1664-8021},
doi = {10.3389/fgene.2019.01203},
pmid = {31824580},
abstract = {{Pathway-centric approaches are widely used to interpret and contextualize -omics data. However, databases contain different representations of the same biological pathway, which may lead to different results of statistical enrichment analysis and predictive models in the context of precision medicine. We have performed an in-depth benchmarking of the impact of pathway database choice on statistical enrichment analysis and predictive modeling. We analyzed five cancer datasets using three major pathway databases and developed an approach to merge several databases into a single integrative one: MPath. Our results show that equivalent pathways from different databases yield disparate results in statistical enrichment analysis. Moreover, we observed a significant dataset-dependent impact on the performance of machine learning models on different prediction tasks. In some cases, MPath significantly improved prediction performance and also reduced the variance of prediction performances. Furthermore, MPath yielded more consistent and biologically plausible results in statistical enrichment analyses. In summary, this benchmarking study demonstrates that pathway database choice can influence the results of statistical enrichment analysis and predictive modeling. Therefore, we recommend the use of multiple pathway databases or integrative ones.}},
pages = {1203},
volume = {10},
keywords = {\textasciicircumgraph,\textasciicircumGSEA,\textasciicircumInformatic,\textasciicircumnetwork,\textasciicircumpathway enrichment,\textasciicircumreactome,`machinelearning,`stats},
local-url = {file://localhost/Users/kiefer/Documents/Papers%20Library/2019/Frontiers%20in%20Genetics/Mubeen/Mubeen_Frontiers%20in%20Genetics_2019.pdf},
year = {2019}
}

Thanks for getting back to me. I am using ReadCube Papers to generate the .bib file.

pickleton89 commented 3 years ago

The keywords key field relates to tags I use in Readcube for organization. I use prepend characters to the tag word, such as `,~,#,<, and >, amongst others. Most of these are represented in the .bib file as "\textasciicircumtag". I will play on my end to work to remove the text and space in citekey.

pickleton89 commented 3 years ago

I did change the citekey to remove the journal with spaces. I downloaded a small subset including the Mubeen reference from above and it loaded just fine.