Files
galaxy/test/functional/tools/bibtex.xml
T
John Chilton cb9fc095fc Initial BibTeX/DOI citation support in tools and histories.
Allow tool authors to specify citations using a DOI or BibTeX. BibTeX can be specified either by pointing at a BibTeX file in the tool directory or by embedding bibtex entries right in tool citation blocks. If referencing a file parallel to the tool, the file should contain only a single BibTeX entry, this restriction can be easily lifted by adding a BibTeX parser as a Python dependency for Galaxy - but I do not have permission to do this.

These citations will appear at the bottom of the tool form in a formatted way but the user will have to option to select RAW BibTeX for copying and pasting. Likewise, the history menu now has an option allowing users to aggregatesuch citations across an analysis a comparable list of citations.

UI interactions are implemented using a Backbone model and view and data is fetched from the Galaxy server as BibTeX using the API. Two API entry points have been added - one to fetch the BibTeX entries for a tool and another for a history.

BibTeX entries for citations annotated with DOIs will be fetched from http://dx.doi.org/ and cached using Beaker.

Additional Limitations:

 - I am not super happy with a few different GUI elements of this. It is ugly and I didn't write the BibTeX parser but I did write the code that takes parsed BibTeX and converts it to a formatted entry. If merged, I will outline a Trello card to follow up and improve the UI and find some more standard way to build a formatted HTML citation from a parsed BibTeX entry.

 - BibTeX Limitations: LaTeX embedded in the BibTeX entries doesn't render properly when producing a "pretty" citation in the GUI (should still be exported to citation managers properly though). Cross references aren't supported at this time.

Alternative Implementations:

BibTex/DOI vs. PROV:

There was some discussion of PROV encoding citation information on the development mailing list. The citation tags on tools are typed so this could certainly be added - but it was discussed at the BOSC 2014 codefest and there was some conensus that tool authors are more likely to already have BibTeX or DOIs available for the tool's references and the major reference managers end users will likely plug these citations into while writing papers are more likely to be able to consume BibTeX than anything else.

The bench biologist using Galaxy is the consumer of this work I most concerned with - if we need to convert citations into other formats such as EndNote or Word's bibliography support there is a suite of tools we could optionally plug into Galaxy (http://sourceforge.net/p/bibutils/home/Bibutils/) to enable this down the road. PROV seems to have such an ecosystem to leverage - I could not even find a tool to convert it BibTeX.

Parse BibTeX Client vs Server:

As mentioned above it would be nice in some ways to be able to parse and reason about BibTeX on the backend - but it would require adding a new dependency to Python. Since we have to ship BibTeX to the browser anyway to allow users to copy and paste it - I decided it was easier to start with parsing and formatting BibTeX on the client side. I therefore added the following library BSD JavaScript dependency https://github.com/mayanklahiri/bib2json to enable this. I would be happy to revisit this decision and produce formatted entries server side - there seem to be more Python options for doing this than JavaScript.
2014-07-23 15:43:13 -05:00

313 lines
9.3 KiB
XML

<tool id="bibtex" name="Concatenate datasets (with a bunch of citations)">
<command>
cat $input1
#for $q in $queries
${q.input2}
#end for
&gt; $out_file1;
</command>
<inputs>
<param name="input1" type="data" label="Concatenate Dataset" />
<repeat name="queries" title="Dataset">
<param name="input2" type="data" label="Select" />
</repeat>
</inputs>
<outputs>
<data name="out_file1" format="input" metadata_source="input1"/>
</outputs>
<help>
.. class:: warningmark
**WARNING:** Be careful not to concatenate datasets of different kinds (e.g., sequences with intervals). This tool does not check if the datasets being concatenated are in the same format.
</help>
<citations>
<citation type="doi">10.1101/gr.4086505</citation>
<!-- BibTeX examples taken from:
http://www2.galcit.caltech.edu/~jeshep/GraphicsBib/NatBib/node3.html
-->
<citation type="bibtex">
@ARTICLE{article-minimal,
author = {L[eslie] A. Aamport},
title = {The Gnats and Gnus Document Preparation System},
journal = {\mbox{G-Animal's} Journal},
year = 1986,
}
</citation>
<citation type="bibtex">
@ARTICLE{article-full,
author = {L[eslie] A. Aamport},
title = {The Gnats and Gnus Document Preparation System},
journal = {\mbox{G-Animal's} Journal},
year = 1986,
volume = 41,
number = 7,
pages = "73+",
month = jul,
note = "This is a full ARTICLE entry",
}
</citation>
<citation type="bibtex">
@INBOOK{inbook-minimal,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
publisher = "Addison-Wesley",
year = "{\noopsort{1973b}}1973",
chapter = "1.2",
} </citation>
<citation type="bibtex">
@INBOOK{inbook-full,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
volume = 1,
series = "The Art of Computer Programming",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
edition = "Second",
month = "10~" # jan,
year = "{\noopsort{1973b}}1973",
type = "Section",
chapter = "1.2",
pages = "10--119",
note = "This is a full INBOOK entry",
}
</citation>
<citation type="bibtex">
@BOOK{book-minimal,
author = "Donald E. Knuth",
title = "Seminumerical Algorithms",
publisher = "Addison-Wesley",
year = "{\noopsort{1973c}}1981",
}
</citation>
<citation type="bibtex">
@BOOK{book-full,
author = "Donald E. Knuth",
title = "Seminumerical Algorithms",
volume = 2,
series = "The Art of Computer Programming",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
edition = "Second",
month = "10~" # jan,
year = "{\noopsort{1973c}}1981",
note = "This is a full BOOK entry",
}
</citation>
<citation type="bibtex">
@BOOK{whole-set,
author = "Donald E. Knuth",
publisher = "Addison-Wesley",
title = "The Art of Computer Programming",
series = "Four volumes",
year = "{\noopsort{1973a}}{\switchargs{--90}{1968}}",
note = "Seven volumes planned (this is a cross-referenced set of BOOKs)",
}
</citation>
<citation type="bibtex">
@BOOKLET{booklet-full,
author = "Jill C. Knvth",
title = "The Programming of Computer Art",
howpublished = "Vernier Art Center",
address = "Stanford, California",
month = feb,
year = 1988,
note = "This is a full BOOKLET entry",
}
</citation>
<citation type="bibtex">
@INCOLLECTION{incollection-minimal,
author = "Daniel D. Lincoll",
title = "Semigroups of Recurrences",
booktitle = "High Speed Computer and Algorithm Organization",
publisher = "Academic Press",
year = 1977,
}
</citation>
<citation type="bibtex">
@INCOLLECTION{incollection-full,
author = "Daniel D. Lincoll",
title = "Semigroups of Recurrences",
editor = "David J. Lipcoll and D. H. Lawrie and A. H. Sameh",
booktitle = "High Speed Computer and Algorithm Organization",
number = 23,
series = "Fast Computers",
chapter = 3,
type = "Part",
pages = "179--183",
publisher = "Academic Press",
address = "New York",
edition = "Third",
month = sep,
year = 1977,
note = "This is a full INCOLLECTION entry",
}
</citation>
<citation type="bibtex">
@BOOK{whole-collection,
editor = "David J. Lipcoll and D. H. Lawrie and A. H. Sameh",
title = "High Speed Computer and Algorithm Organization",
booktitle = "High Speed Computer and Algorithm Organization",
number = 23,
series = "Fast Computers",
publisher = "Academic Press",
address = "New York",
edition = "Third",
month = sep,
year = 1977,
}
</citation>
<citation type="bibtex">
@MANUAL{manual-full,
author = "Larry Manmaker",
title = "The Definitive Computer Manual",
organization = "Chips-R-Us",
address = "Silicon Valley",
edition = "Silver",
month = apr # "-" # may,
year = 1986,
note = "This is a full MANUAL entry",
}
</citation>
<citation type="bibtex">
@MASTERSTHESIS{mastersthesis-minimal,
author = "{\'{E}}douard Masterly",
title = "Mastering Thesis Writing",
school = "Stanford University",
year = 1988,
}
</citation>
<citation type="bibtex">
@MASTERSTHESIS{mastersthesis-full,
author = "{\'{E}}douard Masterly",
title = "Mastering Thesis Writing",
school = "Stanford University",
type = "Master's project",
address = "English Department",
month = jun # "-" # aug,
year = 1988,
note = "This is a full MASTERSTHESIS entry",
}
</citation>
<citation type="bibtex">
@MISC{misc-full,
author = "Joe-Bob Missilany",
title = "Handing out random pamphlets in airports",
howpublished = "Handed out at O'Hare",
month = oct,
year = 1984,
note = "This is a full MISC entry",
}
</citation>
<citation type="bibtex">
@INPROCEEDINGS{inproceedings-minimal,
author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis",
title = "On Notions of Information Transfer in {VLSI} Circuits",
booktitle = "Proc. Fifteenth Annual ACM" # STOC,
year = 1983,
}
</citation>
<citation type="bibtex">
@INPROCEEDINGS{inproceedings-full,
author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis",
title = "On Notions of Information Transfer in {VLSI} Circuits",
editor = "Wizard V. Oz and Mihalis Yannakakis",
booktitle = "Proc. Fifteenth Annual ACM" # STOC,
number = 17,
series = "All ACM Conferences",
pages = "133--139",
month = mar,
year = 1983,
address = "Boston",
organization = ACM,
publisher = "Academic Press",
note = "This is a full INPROCEDINGS entry",
}
</citation>
<citation type="bibtex">
@INPROCEEDINGS{inproceedings-crossref,
crossref = "whole-proceedings",
author = "Alfred V. Oaho and Jeffrey D. Ullman and Mihalis Yannakakis",
title = "On Notions of Information Transfer in {VLSI} Circuits",
organization = "",
pages = "133--139",
note = "This is a cross-referencing INPROCEEDINGS entry",
}
</citation>
<citation type="bibtex">
@PROCEEDINGS{proceedings-full,
editor = "Wizard V. Oz and Mihalis Yannakakis",
title = "Proc. Fifteenth Annual" # STOC,
number = 17,
series = "All ACM Conferences",
month = mar,
year = 1983,
address = "Boston",
organization = ACM,
publisher = "Academic Press",
note = "This is a full PROCEEDINGS entry",
}
</citation>
<citation type="bibtex">
@PHDTHESIS{phdthesis-minimal,
author = "F. Phidias Phony-Baloney",
title = "Fighting Fire with Fire: Festooning {F}rench Phrases",
school = "Fanstord University",
year = 1988,
}
</citation>
<citation type="bibtex">
@PHDTHESIS{phdthesis-full,
author = "F. Phidias Phony-Baloney",
title = "Fighting Fire with Fire: Festooning {F}rench Phrases",
school = "Fanstord University",
type = "{PhD} Dissertation",
address = "Department of French",
month = jun # "-" # aug,
year = 1988,
note = "This is a full PHDTHESIS entry",
}
</citation>
<citation type="bibtex">
@TECHREPORT{techreport-minimal,
author = "Tom Terrific",
title = "An {$O(n \log n / \! \log\log n)$} Sorting Algorithm",
institution = "Fanstord University",
year = 1988,
}
</citation>
<citation type="bibtex">
@TECHREPORT{techreport-full,
author = "Tom T{\'{e}}rrific",
title = "An {$O(n \log n / \! \log\log n)$} Sorting Algorithm",
institution = "Fanstord University",
type = "Wishful Research Result",
number = "7",
address = "Computer Science Department, Fanstord, California",
month = oct,
year = 1988,
note = "This is a full TECHREPORT entry",
}
</citation>
<citation type="bibtex">
@UNPUBLISHED{unpublished-minimal,
author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot",
title = "Lower Bounds for Wishful Research Results",
note = "Talk at Fanstord University (this is a minimal UNPUBLISHED entry)",
}
</citation>
<citation type="bibtex">
@UNPUBLISHED{unpublished-full,
author = "Ulrich {\"{U}}nderwood and Ned {\~N}et and Paul {\={P}}ot",
title = "Lower Bounds for Wishful Research Results",
month = nov # ", " # dec,
year = 1988,
note = "Talk at Fanstord University (this is a full UNPUBLISHED entry)",
}
</citation>
<citation type="doi">10.1101/gr.4086505</citation>
</citations>
</tool>