├── .gitignore ├── LICENSE ├── PLOS-submission.eps ├── README.md ├── authors.tex ├── bibliography.bbl ├── bibliography ├── .placeholder.md ├── biblio.bib └── converted_to_latex.bib ├── blischak-et-al.pdf ├── blischak-et-al.tex ├── box-1-definitions.tex ├── box-2-what-not-to-version-control.tex ├── box-3-managing-large-files.tex ├── box-4-licensing.tex ├── box-5-being-scooped.tex ├── box-6-sharing-policies.tex ├── box-7-branching.tex ├── build-full-article.py ├── code ├── README.md ├── analyze.R ├── clean.py └── process.sh ├── comments.txt ├── compile-to-pdf.sh ├── conclusion.tex ├── contribute-to-other-projects.tex ├── create-diff-file.sh ├── diff.pdf ├── diff.tex ├── diff2.pdf ├── diff2.tex ├── figure-legends.tex ├── figures ├── .placeholder.md ├── Fig1 │ ├── Fig1.eps │ ├── Fig1.png │ ├── Fig1.tif │ ├── caption.tex │ └── size.tex ├── Fig2 │ ├── Fig2.eps │ ├── Fig2.png │ ├── Fig2.tif │ ├── caption.tex │ └── size.tex ├── Fig3 │ ├── Fig3.eps │ ├── Fig3.png │ ├── Fig3.tif │ ├── caption.tex │ └── size.tex ├── Fig4 │ ├── Fig4.eps │ ├── Fig4.png │ ├── Fig4.tif │ ├── caption.tex │ └── size.tex └── S1_Fig │ ├── S1_Fig.eps │ ├── S1_Fig.png │ ├── caption.tex │ └── size.tex ├── header-local.tex ├── introduction.tex ├── layout.md ├── methods.tex ├── plos2015.bst ├── readers ├── 110722.txt ├── 22solveStella.txt ├── AbelSaul.txt ├── AnneBr.txt ├── Atotenschaedel.txt ├── Christinamurphy01.txt ├── Chrisu08.txt ├── DCEW.txt ├── DerZ115.txt ├── DesmondSmith.txt ├── Felydae.txt ├── Hennebe.txt ├── Isaac-Woodard.txt ├── IsabellaLiFischer.txt ├── IsabellePotterill.txt ├── Izzy-J-R.txt ├── JGilheany.txt ├── LeonBat.txt ├── Lodegit.txt ├── LordRegibald.txt ├── LuGri.txt ├── MARTINFERREIRO.txt ├── MM004.txt ├── MarcelVanOijen.txt ├── Melyyyy123.txt ├── Moderate-PG.txt ├── Monrilo.txt ├── Mrt905.txt ├── OrangeMati.txt ├── PSCoding123.txt ├── Parijat1601.txt ├── PhRausch.txt ├── SFAM14.txt ├── SaikollaLab.txt ├── SebGritsch.txt ├── ShirlynXu.txt ├── SkyMaden.txt ├── Sonja117012.txt ├── SophieHampejs.txt ├── StasiaATP.txt ├── Verena1992.txt ├── Victoria06022002.txt ├── WilliamAboucaya.txt ├── aaaalex5.txt ├── aamberger.txt ├── abbynewbury.txt ├── acgraf.txt ├── adomingues.txt ├── alesandrae.txt ├── allysonsny.txt ├── amirfeizi.txt ├── anarchistic-bacteria.txt ├── annagauner.txt ├── annamrak.txt ├── annazoechner.txt ├── anniew.txt ├── anpefi.txt ├── armin-neuro.txt ├── avicens.txt ├── avv5279.txt ├── benedict-yuen.txt ├── biodatasciencetulln.txt ├── bpecken.txt ├── brianehenyo.txt ├── bry10187.txt ├── bsophi.txt ├── c-mayer.txt ├── cdanielmachado.txt ├── cginer.txt ├── chrissieboe.txt ├── cicci726.txt ├── daniiiii21.txt ├── danschw.txt ├── davetang.txt ├── david-aceituno.txt ├── davidlilek.txt ├── denironyx.txt ├── domenatz.txt ├── ec363.txt ├── ejj5147.txt ├── erdavenport.txt ├── fhwnmatt.txt ├── fmenol.txt ├── gschloegel.txt ├── gurukatagi.txt ├── gvwilson.txt ├── gwangjinkim.txt ├── gwiesner.txt ├── heisslaura.txt ├── hronn95.txt ├── hufnhuf.txt ├── isabellapauser.txt ├── jandolinsek.txt ├── jbonaffini.txt ├── jdarias93.txt ├── jdblischak.txt ├── jimdwyer.txt ├── jjodx.txt ├── joelograsso.txt ├── jordanok25.txt ├── joshuar11.txt ├── joslesh.txt ├── jtehand.txt ├── kadsae.txt ├── kbin94.txt ├── kevinpryan.txt ├── ksw9.txt ├── kvcross.txt ├── lchunhui.txt ├── louisepb.txt ├── macaple.txt ├── manukill.txt ├── marcohamins.txt ├── mariorollojr.txt ├── martin2801.txt ├── martina8991.txt ├── mbogdana.txt ├── michelle-1707.txt ├── minino-s.txt ├── mitrazad.txt ├── nanschko.txt ├── nbmanning.txt ├── nigginoki.txt ├── noex69.txt ├── oasalmon.txt ├── oryoruk.txt ├── philiprn.txt ├── pinkysaid.txt ├── polymerase11.txt ├── quyenvanorden.txt ├── rbjorkas.txt ├── rbrauning.txt ├── rcosentino.txt ├── rdpalacio.txt ├── rhcaeb.txt ├── richardhuskey.txt ├── robschick.txt ├── roisinks.txt ├── rqb5558.txt ├── schneifel.txt ├── sehias.txt ├── sgansb.txt ├── simsal35.txt ├── slaurie.txt ├── sunh20.txt ├── suvans1366.txt ├── tboulier.txt ├── thegitrogmonster.txt ├── tinscherl2.txt ├── tjelvar-olsson.txt ├── troehrs.txt ├── turtley-awesome-tort.txt ├── twmccart.txt ├── unimichl.txt ├── vitorc.txt ├── vlr5103.txt ├── wagdav.txt ├── wtadler.txt ├── xfst.txt ├── xhannahxh.txt ├── ynomitna.txt └── zia1138.txt ├── share-your-code.tex ├── submission.md ├── supporting-information-legends.tex ├── table-1-resources.tex ├── title.tex ├── tutorial.sh └── version-your-code.tex /.gitignore: -------------------------------------------------------------------------------- 1 | data/ 2 | *~ 3 | *.aux 4 | *.bbl 5 | *.blg 6 | *.dvi 7 | *.log 8 | *.out 9 | *.zip 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | Attribution 3.0 Unported 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR 10 | DAMAGES RESULTING FROM ITS USE. 11 | 12 | License 13 | 14 | THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE 15 | COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY 16 | COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS 17 | AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. 18 | 19 | BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE 20 | TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY 21 | BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS 22 | CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND 23 | CONDITIONS. 24 | 25 | 1. Definitions 26 | 27 | a. "Adaptation" means a work based upon the Work, or upon the Work and 28 | other pre-existing works, such as a translation, adaptation, 29 | derivative work, arrangement of music or other alterations of a 30 | literary or artistic work, or phonogram or performance and includes 31 | cinematographic adaptations or any other form in which the Work may be 32 | recast, transformed, or adapted including in any form recognizably 33 | derived from the original, except that a work that constitutes a 34 | Collection will not be considered an Adaptation for the purpose of 35 | this License. For the avoidance of doubt, where the Work is a musical 36 | work, performance or phonogram, the synchronization of the Work in 37 | timed-relation with a moving image ("synching") will be considered an 38 | Adaptation for the purpose of this License. 39 | b. "Collection" means a collection of literary or artistic works, such as 40 | encyclopedias and anthologies, or performances, phonograms or 41 | broadcasts, or other works or subject matter other than works listed 42 | in Section 1(f) below, which, by reason of the selection and 43 | arrangement of their contents, constitute intellectual creations, in 44 | which the Work is included in its entirety in unmodified form along 45 | with one or more other contributions, each constituting separate and 46 | independent works in themselves, which together are assembled into a 47 | collective whole. A work that constitutes a Collection will not be 48 | considered an Adaptation (as defined above) for the purposes of this 49 | License. 50 | c. "Distribute" means to make available to the public the original and 51 | copies of the Work or Adaptation, as appropriate, through sale or 52 | other transfer of ownership. 53 | d. "Licensor" means the individual, individuals, entity or entities that 54 | offer(s) the Work under the terms of this License. 55 | e. "Original Author" means, in the case of a literary or artistic work, 56 | the individual, individuals, entity or entities who created the Work 57 | or if no individual or entity can be identified, the publisher; and in 58 | addition (i) in the case of a performance the actors, singers, 59 | musicians, dancers, and other persons who act, sing, deliver, declaim, 60 | play in, interpret or otherwise perform literary or artistic works or 61 | expressions of folklore; (ii) in the case of a phonogram the producer 62 | being the person or legal entity who first fixes the sounds of a 63 | performance or other sounds; and, (iii) in the case of broadcasts, the 64 | organization that transmits the broadcast. 65 | f. "Work" means the literary and/or artistic work offered under the terms 66 | of this License including without limitation any production in the 67 | literary, scientific and artistic domain, whatever may be the mode or 68 | form of its expression including digital form, such as a book, 69 | pamphlet and other writing; a lecture, address, sermon or other work 70 | of the same nature; a dramatic or dramatico-musical work; a 71 | choreographic work or entertainment in dumb show; a musical 72 | composition with or without words; a cinematographic work to which are 73 | assimilated works expressed by a process analogous to cinematography; 74 | a work of drawing, painting, architecture, sculpture, engraving or 75 | lithography; a photographic work to which are assimilated works 76 | expressed by a process analogous to photography; a work of applied 77 | art; an illustration, map, plan, sketch or three-dimensional work 78 | relative to geography, topography, architecture or science; a 79 | performance; a broadcast; a phonogram; a compilation of data to the 80 | extent it is protected as a copyrightable work; or a work performed by 81 | a variety or circus performer to the extent it is not otherwise 82 | considered a literary or artistic work. 83 | g. "You" means an individual or entity exercising rights under this 84 | License who has not previously violated the terms of this License with 85 | respect to the Work, or who has received express permission from the 86 | Licensor to exercise rights under this License despite a previous 87 | violation. 88 | h. "Publicly Perform" means to perform public recitations of the Work and 89 | to communicate to the public those public recitations, by any means or 90 | process, including by wire or wireless means or public digital 91 | performances; to make available to the public Works in such a way that 92 | members of the public may access these Works from a place and at a 93 | place individually chosen by them; to perform the Work to the public 94 | by any means or process and the communication to the public of the 95 | performances of the Work, including by public digital performance; to 96 | broadcast and rebroadcast the Work by any means including signs, 97 | sounds or images. 98 | i. "Reproduce" means to make copies of the Work by any means including 99 | without limitation by sound or visual recordings and the right of 100 | fixation and reproducing fixations of the Work, including storage of a 101 | protected performance or phonogram in digital form or other electronic 102 | medium. 103 | 104 | 2. Fair Dealing Rights. Nothing in this License is intended to reduce, 105 | limit, or restrict any uses free from copyright or rights arising from 106 | limitations or exceptions that are provided for in connection with the 107 | copyright protection under copyright law or other applicable laws. 108 | 109 | 3. License Grant. Subject to the terms and conditions of this License, 110 | Licensor hereby grants You a worldwide, royalty-free, non-exclusive, 111 | perpetual (for the duration of the applicable copyright) license to 112 | exercise the rights in the Work as stated below: 113 | 114 | a. to Reproduce the Work, to incorporate the Work into one or more 115 | Collections, and to Reproduce the Work as incorporated in the 116 | Collections; 117 | b. to create and Reproduce Adaptations provided that any such Adaptation, 118 | including any translation in any medium, takes reasonable steps to 119 | clearly label, demarcate or otherwise identify that changes were made 120 | to the original Work. For example, a translation could be marked "The 121 | original work was translated from English to Spanish," or a 122 | modification could indicate "The original work has been modified."; 123 | c. to Distribute and Publicly Perform the Work including as incorporated 124 | in Collections; and, 125 | d. to Distribute and Publicly Perform Adaptations. 126 | e. For the avoidance of doubt: 127 | 128 | i. Non-waivable Compulsory License Schemes. In those jurisdictions in 129 | which the right to collect royalties through any statutory or 130 | compulsory licensing scheme cannot be waived, the Licensor 131 | reserves the exclusive right to collect such royalties for any 132 | exercise by You of the rights granted under this License; 133 | ii. Waivable Compulsory License Schemes. In those jurisdictions in 134 | which the right to collect royalties through any statutory or 135 | compulsory licensing scheme can be waived, the Licensor waives the 136 | exclusive right to collect such royalties for any exercise by You 137 | of the rights granted under this License; and, 138 | iii. Voluntary License Schemes. The Licensor waives the right to 139 | collect royalties, whether individually or, in the event that the 140 | Licensor is a member of a collecting society that administers 141 | voluntary licensing schemes, via that society, from any exercise 142 | by You of the rights granted under this License. 143 | 144 | The above rights may be exercised in all media and formats whether now 145 | known or hereafter devised. The above rights include the right to make 146 | such modifications as are technically necessary to exercise the rights in 147 | other media and formats. Subject to Section 8(f), all rights not expressly 148 | granted by Licensor are hereby reserved. 149 | 150 | 4. Restrictions. The license granted in Section 3 above is expressly made 151 | subject to and limited by the following restrictions: 152 | 153 | a. You may Distribute or Publicly Perform the Work only under the terms 154 | of this License. You must include a copy of, or the Uniform Resource 155 | Identifier (URI) for, this License with every copy of the Work You 156 | Distribute or Publicly Perform. You may not offer or impose any terms 157 | on the Work that restrict the terms of this License or the ability of 158 | the recipient of the Work to exercise the rights granted to that 159 | recipient under the terms of the License. You may not sublicense the 160 | Work. You must keep intact all notices that refer to this License and 161 | to the disclaimer of warranties with every copy of the Work You 162 | Distribute or Publicly Perform. When You Distribute or Publicly 163 | Perform the Work, You may not impose any effective technological 164 | measures on the Work that restrict the ability of a recipient of the 165 | Work from You to exercise the rights granted to that recipient under 166 | the terms of the License. This Section 4(a) applies to the Work as 167 | incorporated in a Collection, but this does not require the Collection 168 | apart from the Work itself to be made subject to the terms of this 169 | License. If You create a Collection, upon notice from any Licensor You 170 | must, to the extent practicable, remove from the Collection any credit 171 | as required by Section 4(b), as requested. If You create an 172 | Adaptation, upon notice from any Licensor You must, to the extent 173 | practicable, remove from the Adaptation any credit as required by 174 | Section 4(b), as requested. 175 | b. If You Distribute, or Publicly Perform the Work or any Adaptations or 176 | Collections, You must, unless a request has been made pursuant to 177 | Section 4(a), keep intact all copyright notices for the Work and 178 | provide, reasonable to the medium or means You are utilizing: (i) the 179 | name of the Original Author (or pseudonym, if applicable) if supplied, 180 | and/or if the Original Author and/or Licensor designate another party 181 | or parties (e.g., a sponsor institute, publishing entity, journal) for 182 | attribution ("Attribution Parties") in Licensor's copyright notice, 183 | terms of service or by other reasonable means, the name of such party 184 | or parties; (ii) the title of the Work if supplied; (iii) to the 185 | extent reasonably practicable, the URI, if any, that Licensor 186 | specifies to be associated with the Work, unless such URI does not 187 | refer to the copyright notice or licensing information for the Work; 188 | and (iv) , consistent with Section 3(b), in the case of an Adaptation, 189 | a credit identifying the use of the Work in the Adaptation (e.g., 190 | "French translation of the Work by Original Author," or "Screenplay 191 | based on original Work by Original Author"). The credit required by 192 | this Section 4 (b) may be implemented in any reasonable manner; 193 | provided, however, that in the case of a Adaptation or Collection, at 194 | a minimum such credit will appear, if a credit for all contributing 195 | authors of the Adaptation or Collection appears, then as part of these 196 | credits and in a manner at least as prominent as the credits for the 197 | other contributing authors. For the avoidance of doubt, You may only 198 | use the credit required by this Section for the purpose of attribution 199 | in the manner set out above and, by exercising Your rights under this 200 | License, You may not implicitly or explicitly assert or imply any 201 | connection with, sponsorship or endorsement by the Original Author, 202 | Licensor and/or Attribution Parties, as appropriate, of You or Your 203 | use of the Work, without the separate, express prior written 204 | permission of the Original Author, Licensor and/or Attribution 205 | Parties. 206 | c. Except as otherwise agreed in writing by the Licensor or as may be 207 | otherwise permitted by applicable law, if You Reproduce, Distribute or 208 | Publicly Perform the Work either by itself or as part of any 209 | Adaptations or Collections, You must not distort, mutilate, modify or 210 | take other derogatory action in relation to the Work which would be 211 | prejudicial to the Original Author's honor or reputation. Licensor 212 | agrees that in those jurisdictions (e.g. Japan), in which any exercise 213 | of the right granted in Section 3(b) of this License (the right to 214 | make Adaptations) would be deemed to be a distortion, mutilation, 215 | modification or other derogatory action prejudicial to the Original 216 | Author's honor and reputation, the Licensor will waive or not assert, 217 | as appropriate, this Section, to the fullest extent permitted by the 218 | applicable national law, to enable You to reasonably exercise Your 219 | right under Section 3(b) of this License (right to make Adaptations) 220 | but not otherwise. 221 | 222 | 5. Representations, Warranties and Disclaimer 223 | 224 | UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR 225 | OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY 226 | KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, 227 | INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, 228 | FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF 229 | LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, 230 | WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION 231 | OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. 232 | 233 | 6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE 234 | LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR 235 | ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES 236 | ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS 237 | BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 238 | 239 | 7. Termination 240 | 241 | a. This License and the rights granted hereunder will terminate 242 | automatically upon any breach by You of the terms of this License. 243 | Individuals or entities who have received Adaptations or Collections 244 | from You under this License, however, will not have their licenses 245 | terminated provided such individuals or entities remain in full 246 | compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will 247 | survive any termination of this License. 248 | b. Subject to the above terms and conditions, the license granted here is 249 | perpetual (for the duration of the applicable copyright in the Work). 250 | Notwithstanding the above, Licensor reserves the right to release the 251 | Work under different license terms or to stop distributing the Work at 252 | any time; provided, however that any such election will not serve to 253 | withdraw this License (or any other license that has been, or is 254 | required to be, granted under the terms of this License), and this 255 | License will continue in full force and effect unless terminated as 256 | stated above. 257 | 258 | 8. Miscellaneous 259 | 260 | a. Each time You Distribute or Publicly Perform the Work or a Collection, 261 | the Licensor offers to the recipient a license to the Work on the same 262 | terms and conditions as the license granted to You under this License. 263 | b. Each time You Distribute or Publicly Perform an Adaptation, Licensor 264 | offers to the recipient a license to the original Work on the same 265 | terms and conditions as the license granted to You under this License. 266 | c. If any provision of this License is invalid or unenforceable under 267 | applicable law, it shall not affect the validity or enforceability of 268 | the remainder of the terms of this License, and without further action 269 | by the parties to this agreement, such provision shall be reformed to 270 | the minimum extent necessary to make such provision valid and 271 | enforceable. 272 | d. No term or provision of this License shall be deemed waived and no 273 | breach consented to unless such waiver or consent shall be in writing 274 | and signed by the party to be charged with such waiver or consent. 275 | e. This License constitutes the entire agreement between the parties with 276 | respect to the Work licensed here. There are no understandings, 277 | agreements or representations with respect to the Work not specified 278 | here. Licensor shall not be bound by any additional provisions that 279 | may appear in any communication from You. This License may not be 280 | modified without the mutual written agreement of the Licensor and You. 281 | f. The rights granted under, and the subject matter referenced, in this 282 | License were drafted utilizing the terminology of the Berne Convention 283 | for the Protection of Literary and Artistic Works (as amended on 284 | September 28, 1979), the Rome Convention of 1961, the WIPO Copyright 285 | Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 286 | and the Universal Copyright Convention (as revised on July 24, 1971). 287 | These rights and subject matter take effect in the relevant 288 | jurisdiction in which the License terms are sought to be enforced 289 | according to the corresponding provisions of the implementation of 290 | those treaty provisions in the applicable national law. If the 291 | standard suite of rights granted under applicable copyright law 292 | includes additional rights not granted under this License, such 293 | additional rights are deemed to be included in the License; this 294 | License is not intended to restrict the license of any rights under 295 | applicable law. 296 | 297 | 298 | Creative Commons Notice 299 | 300 | Creative Commons is not a party to this License, and makes no warranty 301 | whatsoever in connection with the Work. Creative Commons will not be 302 | liable to You or any party on any legal theory for any damages 303 | whatsoever, including without limitation any general, special, 304 | incidental or consequential damages arising in connection to this 305 | license. Notwithstanding the foregoing two (2) sentences, if Creative 306 | Commons has expressly identified itself as the Licensor hereunder, it 307 | shall have all rights and obligations of Licensor. 308 | 309 | Except for the limited purpose of indicating to the public that the 310 | Work is licensed under the CCPL, Creative Commons does not authorize 311 | the use by either party of the trademark "Creative Commons" or any 312 | related trademark or logo of Creative Commons without the prior 313 | written consent of Creative Commons. Any permitted use will be in 314 | compliance with Creative Commons' then-current trademark usage 315 | guidelines, as may be published on its website or otherwise made 316 | available upon request from time to time. For the avoidance of doubt, 317 | this trademark restriction does not form part of this License. 318 | 319 | Creative Commons may be contacted at https://creativecommons.org/. 320 | -------------------------------------------------------------------------------- /PLOS-submission.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/PLOS-submission.eps -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # A quick introduction to version control with Git and GitHub 2 | 3 | This paper has been published ([link to final version][final]) as part of the PLOS Computational Biology [Education Collection][education]. 4 | 5 | [final]: http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004668 6 | [education]: http://collections.plos.org/compbiol-education 7 | 8 | ## Synopsis and Motivation 9 | 10 | This is the repository for the paper "A quick introduction to version control with Git and GitHub". 11 | The goal of this paper was to introduce scientists to the concepts behind version control (using Git) so that they can incorporate these practices into their workflows. 12 | The [manuscript](https://www.authorea.com/users/5990/articles/17489/_show_article) was written using the [Authorea](http://www.Authorea.com) platform. 13 | 14 | In the manuscript, we encourage readers to practice using GitHub by contributing to this repository. 15 | The full details are explained in the section [Contribute to other projects][contribute], but briefly the steps are: 16 | 17 | * Fork the repository 18 | * `git clone` the fork locally 19 | * Add a file called `{GitHub_username}.txt` to the `readers` folder 20 | (replace `{GitHub_username}` with your own GitHub username) 21 | * `git add` + `git commit` 22 | * `git push` the commit to GitHub 23 | * Issue a Pull Request (PR) to incorporate the change into this repository 24 | 25 | Take a look in the [readers](readers) folder to see all of the contributions from anyone who has had a Pull Request accepted. 26 | If you haven't contributed already, we'd love to see your PR! 27 | 28 | [contribute]: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004668#sec011 29 | 30 | ## Example code 31 | 32 | The example code, which were provided as supplementary files, can be found in the sudirectory `code`. 33 | If you're interested in running the scripts, please see the [README](code/README.md) in that directory for instructions. 34 | 35 | ## Build the document 36 | 37 | The full tex file and compiled PDF can be obtained from the "Export document" on the [Authorea page][authorea-page] for this article. 38 | Choose the PLOS 2015 template for the best results. 39 | 40 | However, to both maintain a presentable version for display on Authorea (e.g. contain the figures) and a version that complies with the [PLOS submission guidelines][plos-submit] (e.g. only contain figure captions but not images), we created a [custom Python script](build-full-article.py) to build the final [TEX](blischak-et-al.tex) and [PDF](blischak-et-al.pdf) files for submission. 41 | Run it as follows: 42 | 43 | ```python 44 | python build-full-article.py > blischak-et-al.tex 45 | ``` 46 | 47 | You should be able to run it with either major version of Python. 48 | We were able to run it with either Python 2.7.10 or Python 3.4.3. 49 | 50 | [authorea-page]: https://www.authorea.com/users/5990/articles/17489 51 | [plos-submit]: http://journals.plos.org/plosone/s/latex 52 | 53 | ## Contributors 54 | 55 | Thank you to all of our [contributors](https://github.com/jdblischak/git-for-science/graphs/contributors)! 56 | 57 | ## License 58 | 59 | [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/). 60 | Please see the file [license](LICENSE) for the full legal text. 61 | -------------------------------------------------------------------------------- /authors.tex: -------------------------------------------------------------------------------- 1 | % Authorea attempts to automatically add an \author macro if it does 2 | % not observe one in this file. I do not want that behavior because it 3 | % breaks my formatting below. Thus I just provide it in a comment. 4 | % https://github.com/jdblischak/test-authorea/commit/dc3b671f973325b492e6edec546dc81ea0637346 5 | 6 | % \authors 7 | 8 | \iflatexml 9 | \href{https://www.authorea.com/users/5990}{John D. Blischak}(1), \href{https://www.authorea.com/users/16152}{Emily R. Davenport}(2), \href{https://www.authorea.com/users/18131}{Greg Wilson}(3)\\ 10 | 11 | (1) Committee on Genetics, Genomics, and Systems Biology, University of Chicago, Chicago, IL, USA\\ 12 | (2) Department of Molecular Biology and Genetics, Cornell University, Ithaca, NY, USA\\ 13 | (3) Software Carpentry Foundation, Toronto, Ontario, Canada 14 | \else 15 | John D. Blischak\textsuperscript{1,*}, 16 | Emily R. Davenport\textsuperscript{2}, 17 | Greg Wilson\textsuperscript{3} 18 | \\ 19 | \bigskip 20 | \bf{1} Committee on Genetics, Genomics, and Systems Biology, University of Chicago, Chicago, IL, USA 21 | \\ 22 | \bf{2} Department of Molecular Biology and Genetics, Cornell University, Ithaca, NY, USA 23 | \\ 24 | \bf{3} Software Carpentry Foundation, Toronto, Ontario, Canada 25 | \\ 26 | \bigskip 27 | * jdblischak@gmail.com 28 | -------------------------------------------------------------------------------- /bibliography.bbl: -------------------------------------------------------------------------------- 1 | \begin{thebibliography}{1} 2 | 3 | \bibitem{23448176} 4 | Ram K. 5 | \newblock {Git can facilitate greater reproducibility and increased 6 | transparency in science.} 7 | \newblock Source Code Biol Med. 2013 Feb;8:7. 8 | 9 | \bibitem{24415924} 10 | Wilson G, Aruliah D, Brown C, Chue HN, Davis M, Guy R, et~al. 11 | \newblock {Best practices for scientific computing.} 12 | \newblock PLoS Biol. 2014 Jan;12:e1001745. 13 | 14 | \bibitem{22955616} 15 | {ENCODE Project Consortium}, Bernstein B, Birney E, Dunham I, Green E, Gunter 16 | C, et~al. 17 | \newblock {An integrated encyclopedia of DNA elements in the human genome.} 18 | \newblock Nature. 2012 Sep;489:57--74. 19 | 20 | \bibitem{24244136} 21 | Bailey T, Krajewski P, Ladunga I, Lefebvre C, Li Q, Liu T, et~al. 22 | \newblock {Practical guidelines for the comprehensive analysis of ChIP-seq 23 | data.} 24 | \newblock PLoS Comput Biol. 2013 null;9:e1003326. 25 | 26 | \bibitem{19649301} 27 | Noble W. 28 | \newblock {A quick guide to organizing computational biology projects.} 29 | \newblock PLoS Comput Biol. 2009 Jul;5:e1000424. 30 | 31 | \bibitem{22844236} 32 | Morin A, Urban J, Sliz P. 33 | \newblock {A quick guide to software licensing for the scientist-programmer.} 34 | \newblock PLoS Comput Biol. 2012 null;8:e1002598. 35 | 36 | \end{thebibliography} 37 | -------------------------------------------------------------------------------- /bibliography/.placeholder.md: -------------------------------------------------------------------------------- 1 | this is a placeholder for the directory -------------------------------------------------------------------------------- /bibliography/biblio.bib: -------------------------------------------------------------------------------- 1 | @article{23448176, 2 | title = {{Git can facilitate greater reproducibility and increased transparency in science.}}, 3 | date = {2013 Feb 28}, 4 | source = {Source Code Biol Med}, 5 | authors = {Ram, K}, 6 | author = {Ram, K}, 7 | year = {2013}, 8 | month = {Feb}, 9 | journal = {Source Code Biol Med}, 10 | volume = {8}, 11 | number = {}, 12 | pages = {7}, 13 | pubmed_id = {23448176}, 14 | } 15 | 16 | 17 | @article{24415924, 18 | title = {{Best practices for scientific computing.}}, 19 | date = {2014 Jan}, 20 | source = {PLoS Biol}, 21 | authors = {Wilson, G and Aruliah, DA and Brown, CT and Chue, Hong NP and Davis, M and Guy, RT and Haddock, SH and Huff, KD and Mitchell, IM and Plumbley, MD and Waugh, B and White, EP and Wilson, P}, 22 | author = {Wilson, G and Aruliah, DA and Brown, CT and Chue, Hong NP and Davis, M and Guy, RT and Haddock, SH and Huff, KD and Mitchell, IM and Plumbley, MD and Waugh, B and White, EP and Wilson, P}, 23 | year = {2014}, 24 | month = {Jan}, 25 | journal = {PLoS Biol}, 26 | volume = {12}, 27 | number = {}, 28 | pages = {e1001745}, 29 | pubmed_id = {24415924}, 30 | } 31 | 32 | 33 | @article{22844236, 34 | title = {{A quick guide to software licensing for the scientist-programmer.}}, 35 | date = {2012}, 36 | source = {PLoS Comput Biol}, 37 | authors = {Morin, A and Urban, J and Sliz, P}, 38 | author = {Morin, A and Urban, J and Sliz, P}, 39 | year = {2012}, 40 | month = {null}, 41 | journal = {PLoS Comput Biol}, 42 | volume = {8}, 43 | number = {}, 44 | pages = {e1002598}, 45 | pubmed_id = {22844236}, 46 | } 47 | 48 | 49 | @article{19649301, 50 | title = {{A quick guide to organizing computational biology projects.}}, 51 | date = {2009 Jul}, 52 | source = {PLoS Comput Biol}, 53 | authors = {Noble, WS}, 54 | author = {Noble, WS}, 55 | year = {2009}, 56 | month = {Jul}, 57 | journal = {PLoS Comput Biol}, 58 | volume = {5}, 59 | number = {}, 60 | pages = {e1000424}, 61 | pubmed_id = {19649301}, 62 | } 63 | 64 | 65 | @article{22955616, 66 | title = {{An integrated encyclopedia of DNA elements in the human genome.}}, 67 | date = {2012 Sep 6}, 68 | source = {Nature}, 69 | authors = {}, 70 | author = {{ENCODE Project Consortium} and Bernstein, BE and Birney, E and Dunham, I and Green, ED and Gunter, C and Snyder, M}, 71 | year = {2012}, 72 | month = {Sep}, 73 | journal = {Nature}, 74 | volume = {489}, 75 | number = {}, 76 | pages = {57-74}, 77 | pubmed_id = {22955616}, 78 | } 79 | 80 | 81 | @article{24244136, 82 | title = {{Practical guidelines for the comprehensive analysis of ChIP-seq data.}}, 83 | date = {2013}, 84 | source = {PLoS Comput Biol}, 85 | authors = {Bailey, T and Krajewski, P and Ladunga, I and Lefebvre, C and Li, Q and Liu, T and Madrigal, P and Taslim, C and Zhang, J}, 86 | author = {Bailey, T and Krajewski, P and Ladunga, I and Lefebvre, C and Li, Q and Liu, T and Madrigal, P and Taslim, C and Zhang, J}, 87 | year = {2013}, 88 | month = {null}, 89 | journal = {PLoS Comput Biol}, 90 | volume = {9}, 91 | number = {}, 92 | pages = {e1003326}, 93 | pubmed_id = {24244136}, 94 | } 95 | 96 | -------------------------------------------------------------------------------- /bibliography/converted_to_latex.bib: -------------------------------------------------------------------------------- 1 | @article{23448176, 2 | title = {{Git can facilitate greater reproducibility and increased transparency in science.}}, 3 | date = {2013 Feb 28}, 4 | source = {Source Code Biol Med}, 5 | authors = {Ram, K}, 6 | author = {Ram, K}, 7 | year = {2013}, 8 | month = {Feb}, 9 | journal = {Source Code Biol Med}, 10 | volume = {8}, 11 | number = {}, 12 | pages = {7}, 13 | pubmed_id = {23448176}, 14 | } 15 | 16 | 17 | @article{24415924, 18 | title = {{Best practices for scientific computing.}}, 19 | date = {2014 Jan}, 20 | source = {PLoS Biol}, 21 | authors = {Wilson, G and Aruliah, DA and Brown, CT and Chue, Hong NP and Davis, M and Guy, RT and Haddock, SH and Huff, KD and Mitchell, IM and Plumbley, MD and Waugh, B and White, EP and Wilson, P}, 22 | author = {Wilson, G and Aruliah, DA and Brown, CT and Chue, Hong NP and Davis, M and Guy, RT and Haddock, SH and Huff, KD and Mitchell, IM and Plumbley, MD and Waugh, B and White, EP and Wilson, P}, 23 | year = {2014}, 24 | month = {Jan}, 25 | journal = {PLoS Biol}, 26 | volume = {12}, 27 | number = {}, 28 | pages = {e1001745}, 29 | pubmed_id = {24415924}, 30 | } 31 | 32 | 33 | @article{22844236, 34 | title = {{A quick guide to software licensing for the scientist-programmer.}}, 35 | date = {2012}, 36 | source = {PLoS Comput Biol}, 37 | authors = {Morin, A and Urban, J and Sliz, P}, 38 | author = {Morin, A and Urban, J and Sliz, P}, 39 | year = {2012}, 40 | month = {null}, 41 | journal = {PLoS Comput Biol}, 42 | volume = {8}, 43 | number = {}, 44 | pages = {e1002598}, 45 | pubmed_id = {22844236}, 46 | } 47 | 48 | 49 | @article{19649301, 50 | title = {{A quick guide to organizing computational biology projects.}}, 51 | date = {2009 Jul}, 52 | source = {PLoS Comput Biol}, 53 | authors = {Noble, WS}, 54 | author = {Noble, WS}, 55 | year = {2009}, 56 | month = {Jul}, 57 | journal = {PLoS Comput Biol}, 58 | volume = {5}, 59 | number = {}, 60 | pages = {e1000424}, 61 | pubmed_id = {19649301}, 62 | } 63 | 64 | 65 | @article{22955616, 66 | title = {{An integrated encyclopedia of DNA elements in the human genome.}}, 67 | date = {2012 Sep 6}, 68 | source = {Nature}, 69 | authors = {}, 70 | author = {{ENCODE Project Consortium} and Bernstein, BE and Birney, E and Dunham, I and Green, ED and Gunter, C and Snyder, M}, 71 | year = {2012}, 72 | month = {Sep}, 73 | journal = {Nature}, 74 | volume = {489}, 75 | number = {}, 76 | pages = {57-74}, 77 | pubmed_id = {22955616}, 78 | } 79 | 80 | 81 | @article{24244136, 82 | title = {{Practical guidelines for the comprehensive analysis of ChIP-seq data.}}, 83 | date = {2013}, 84 | source = {PLoS Comput Biol}, 85 | authors = {Bailey, T and Krajewski, P and Ladunga, I and Lefebvre, C and Li, Q and Liu, T and Madrigal, P and Taslim, C and Zhang, J}, 86 | author = {Bailey, T and Krajewski, P and Ladunga, I and Lefebvre, C and Li, Q and Liu, T and Madrigal, P and Taslim, C and Zhang, J}, 87 | year = {2013}, 88 | month = {null}, 89 | journal = {PLoS Comput Biol}, 90 | volume = {9}, 91 | number = {}, 92 | pages = {e1003326}, 93 | pubmed_id = {24244136}, 94 | } 95 | -------------------------------------------------------------------------------- /blischak-et-al.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/blischak-et-al.pdf -------------------------------------------------------------------------------- /box-1-definitions.tex: -------------------------------------------------------------------------------- 1 | \section*{Box 1: Definitions} 2 | 3 | \begin{itemize} 4 | \item \textbf{Version Control System (VCS)}: \textit{(noun)} a program that tracks changes to specified files over time and maintains a library of all past versions of those files 5 | \item \textbf{Git}: \textit{(noun)} a version control system 6 | \item \textbf{repository (repo)}: \textit{(noun)} folder containing all tracked files as well as the version control history 7 | \item \textbf{commit}: \textit{(noun)} a snapshot of changes made to the staged file(s); \textit{(verb)} to save a snapshot of changes made to the staged file(s) 8 | \item \textbf{stage}: \textit{(noun)} the staging area holds the files to be included in the next commit; \textit{(verb)} to mark a file to be included in the next commit 9 | \item \textbf{track}: \textit{(noun)} a tracked file is one that is recognized by the Git repository 10 | \item \textbf{branch}: \textit{(noun)} a parallel version of the files in a repository (Box 7) 11 | \item \textbf{local}: \textit{(noun)} the version of your repository that is stored on your personal computer 12 | \item \textbf{remote}: \textit{(noun)} the version of your repository that is stored on a remote server, for instance on GitHub 13 | \item \textbf{clone}: \textit{(verb)} to create a local copy of a remote repository on your personal computer 14 | \item \textbf{fork}: \textit{(noun)} a copy of another user's repository on GitHub; \textit{(verb)} to copy a repository, for instance from one user's GitHub account to your own 15 | \item \textbf{merge}: \textit{(verb)} to update files by incorporating the changes introduced in new commits 16 | \item \textbf{pull}: \textit{(verb)} to retrieve commits from a remote repository and merge them into a local repository 17 | \item \textbf{push}: \textit{(verb)} to send commits from a local repository to a remote repository 18 | \item \textbf{pull request}: \textit{(noun)} a message sent by one GitHub user to merge the commits in their remote repository into another user's remote repository 19 | \end{itemize} 20 | -------------------------------------------------------------------------------- /box-2-what-not-to-version-control.tex: -------------------------------------------------------------------------------- 1 | \section*{Box 2: What \textit{not} to version control} 2 | 3 | You \textit{can} version control any file that you put in a Git repository, whether it is text-based, an image, or giant data files. However, just because you \textit{can} version control something, does not mean you \textit{should}. Git works best for plain text based documents such as your scripts or your manuscript if written in LaTeX or Markdown. This is because for text files, Git saves the entire file only the first time you commit it and then saves just your changes with each commit. This takes up very little space and Git has the capability to compare between versions (using \verb|git diff|). You can commit a non-text file, but a full copy of the file will be saved in each commit that modifies it. Over time, you may find the size of your repository growing very quickly. A good rule of thumb is to version control anything text based: your scripts or manuscripts if they are written in plain text. Things \textit{not} to version control are large data files that never change, binary files (including Word and Excel documents), and the output of your code. 4 | 5 | In addition to the type of file, you need to consider the content of the file. 6 | If you plan on sharing your commits publicly using GitHub, ensure you are not committing any files that contain sensitive information, such as human subject data or passwords. 7 | 8 | To prevent accidentally committing files you do not wish to track, and to remove them from the output of \verb|git status|, you can create a file called \verb|.gitignore|. 9 | In this file, you can list subdirectories and/or file patterns that Git should ignore. 10 | For example, if your code produced log files with the file extension \verb|.log|, you could instruct Git to ignore these files by adding \verb|*.log| to \verb|.gitignore|. 11 | In order for these settings to be applied to all instances of the repository, e.g. if you clone it onto another computer, you need to add and commit this file. 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /box-3-managing-large-files.tex: -------------------------------------------------------------------------------- 1 | \section*{Box 3: Managing large files} 2 | 3 | Many biological applications require handling large data files. 4 | While Git is best-suited for collaboratively writing small text files, nonetheless collaboratively working on projects in the biological sciences necesitates managing this data. 5 | 6 | The example analysis pipeline in this tutorial starts by downloading data files in BAM format which contain the alignments of short reads from a ChIP-seq experiment to the human genome. 7 | Since these large, binary files are not going to change, there is no reason to version them with Git. 8 | Thus hosting them on a remote http (as ENCODE has done in this case) or ftp site allows each collaborator to download it to her machine as needed, e.g. using \verb|wget|, \verb|curl|, or \verb|rsync|. 9 | If the data files for your project are smaller, you could also share them via services like Dropbox (\href{www.dropbox.com}{dropbox.com}) or Google Drive (\href{https://www.google.com/drive/}{google.com/drive}). 10 | 11 | However, some intermediate data files may change over time, and the practical necessity to ensure all collaborators are using the same data set may override the advice to \textit{not} put code output under version control, as described in Box 2. 12 | Again returning to the ChIP-seq example, the first step calling the peaks is the most difficult computationally because it requires access to a Unix-like environment and sufficient computational resources. 13 | Thus for collaborators that want to experiment with \verb|clean.py| and \verb|analyze.R| without having to run \verb|process.sh|, you could version the data files containing the ChIP-seq peaks (which are in BED format). 14 | But since these files are larger than that typically used with Git, you can instead use one of the solutions for versioning large files within a Git repository without actually saving the file with Git, e.g. git-annex (\href{https://git-annex.branchable.com/}{git-annex.branchable.com}) or git-fat (\href{https://github.com/jedbrown/git-fat/}{github.com/jedbrown/git-fat}). 15 | Recently GitHub has created their own solution for managing large files called Git Large File Storage (LFS) (\href{https://git-lfs.github.com/}{git-lfs.github.com}). 16 | Instead of committing the entire large file to Git, which quickly becomes unmanageable, it commits a text pointer. 17 | This text pointer refers to a specific file saved on a remote GitHub server. 18 | Thus when you clone a repository, it only downloads the latest version of the large file. 19 | And if you checkout an older version of the repository, it automatically downloads the old version of the large file from the remote server. 20 | After installing Git LFS, you can manage all the BED files with one command: \verb|git lfs track "*.bed"|. 21 | Then you can commit the BED files just like your scripts, and they will automatically be handled with Git LFS. 22 | Now if you were to change the parameters of the peak calling algorithm and re-run \verb|process.sh|, you could commit the updated BED files and your collaborators could pull the new versions of the files directly to their local Git repositories. 23 | -------------------------------------------------------------------------------- /box-4-licensing.tex: -------------------------------------------------------------------------------- 1 | \section*{Box 4: Choosing a license} 2 | 3 | Putting software and other material in a public place is not the same 4 | as making it publicly usable. In order to do that, the authors must 5 | also add a license, since copyright laws in some jurisdictions require 6 | people to treat anything that isn't explicitly open as being 7 | proprietary. 8 | 9 | While dozens of open licenses have been created, the two most widely 10 | used are the GNU Public License (GPL) and the MIT/BSD family of 11 | licenses. Of these, the MIT/BSD-style licenses put the fewest 12 | requirements on re-use, and thereby make it easier for people to 13 | integrate \emph{your} software into \emph{their} project. 14 | 15 | For an excellent short discussion of these issues, and links to more 16 | information, see Jake Vanderplas's blog post from March 2014 at 17 | \href{http://www.astrobetter.com/blog/2014/03/10/the-whys-and-hows-of-licensing-scientific-code/}{astrobetter.com/blog/2014/03/10/the-whys-and-hows-of-licensing-scientific-code}. 18 | For a more in-depth discussion of the legal implications of different licenses, see Morin et al., 2012 \cite{22844236}. 19 | -------------------------------------------------------------------------------- /box-5-being-scooped.tex: -------------------------------------------------------------------------------- 1 | \section*{Box 5: Being Scooped} 2 | 3 | One concern scientists frequently have about putting work in progress online is that they will be scooped, e.g., that someone will analyze their data and publish a result that they themselves would have, but hadn't yet. In practice, though, this happens rarely if at all: in fact, the authors are not aware of a single case in which this has actually happened, and would welcome pointers to specific instances. In practice, it seems more likely that making work public early in something like a version control repository, which automatically adds timestamps to content, will help researchers establish their priority. 4 | -------------------------------------------------------------------------------- /box-6-sharing-policies.tex: -------------------------------------------------------------------------------- 1 | \section*{Box 6: Journal Policies} 2 | 3 | Sharing data, code, and other materials is quickly moving from ``desired'' to ``required''. 4 | For example, PLOS's sharing policy (\href{http://journals.plos.org/plosone/s/materials-and-software-sharing}{journals.plos.org/plosone/s/materials-and-software-sharing}) 5 | already says, ``We expect that all researchers submitting to PLOS will make all relevant materials that may be reasonably requested by others available without restrictions upon publication of the work.'' 6 | Its policy on software is more specific: 7 | 8 | \begin{quote} 9 | We expect that all researchers submitting to PLOS submissions in which software is the central part of the manuscript will make all relevant software available without restrictions upon publication of the work. Authors must ensure that software remains usable over time regardless of versions or upgrades\ldots 10 | \end{quote} 11 | 12 | It then goes on to specify that software must be based on open source standards, 13 | and that it must be put in an archive which is large or long-lived. 14 | Granting agencies, philanthropic foundations, and other major sponsors of scientific research are all moving in the same direction, 15 | and to our knowledge, 16 | none has relaxed or reduced sharing requirements in the last decade. 17 | -------------------------------------------------------------------------------- /box-7-branching.tex: -------------------------------------------------------------------------------- 1 | \section*{Box 7: Branching} 2 | 3 | Do you ever make changes to your code, but are not sure you will want to keep those changes for your final analysis? Or do you need to implement new features while still providing a stable version of the code for others to use? Using Git, you can maintain parallel versions of your code that you can easily bounce between while you are working on your changes. You can think of it like making a copy of the folder you keep your scripts in, so that you have your original scripts intact but also have the new folder where you make changes. Using Git, this is called branching and it is better than separate folders because 1) it uses a fraction of the space on your computer, 2) keeps a record of when you made the parallel copy (branch) and what you have done on the branch, and 3) there is a way to incorporate those changes back into your main code if you decide to keep your changes (and a way to deal with conflicts). By default, your repository will start with one branch, usually called ``master''. To create a new branch in your repository, type \verb|git branch new_branch_name|. You can see what branches a current repository has by typing \verb|git branch|, with the branch you are currently in being marked by a star. To move between branches, type \verb|git checkout branch_to_move_to|. You can edit files and commit them on each branch separately. If you want combine the changes in your new branch with the master branch, you can merge the branches by typing \verb|git merge new_branch_name| while in the master branch. 4 | 5 | 6 | -------------------------------------------------------------------------------- /build-full-article.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # Usage: 4 | # 5 | # python build-full-article.py > blischak-et-al.tex 6 | 7 | ################################################################################ 8 | # Setup 9 | ################################################################################ 10 | 11 | import sys 12 | import textwrap 13 | import glob 14 | 15 | def write_file(fname, blankline = 1, code_adjust = -0.5): 16 | """Write contents of file to standard out. 17 | 18 | Args: 19 | fname - the filename (str) 20 | blankline - the number of blank lines to add after the text (int) 21 | code_adjust - the number of inches to adjust the width of the code 22 | blocks (float) 23 | """ 24 | handle = open(fname, "r") 25 | for line in handle: 26 | if "Table 1" in line: 27 | line = line.replace("Table 1", "Table \\ref{tab:resources}") 28 | if "begin{verbatim}" in line: 29 | sys.stdout.write("\\begin{adjustwidth}{%.2fin}{0in}\n"%(code_adjust)) 30 | sys.stdout.write(line) 31 | if "end{verbatim}" in line: 32 | sys.stdout.write("\\end{adjustwidth}\n") 33 | handle.close() 34 | sys.stdout.write("\n" * blankline) 35 | 36 | 37 | 38 | 39 | def write_figure(caption, label): 40 | """Write labeled figure with the provided caption. 41 | 42 | Args: 43 | caption - a list of strings 44 | label - a string to be used with \label 45 | """ 46 | sys.stdout.write("\\begin{figure}[h]\n") 47 | # Remove \ref macro from figure caption 48 | caption[0] = caption[0].split("}.")[1] 49 | # Bold face the caption title 50 | caption[0] = "\\bf" + caption[0] 51 | 52 | sys.stdout.write("\\cprotect\\caption{{" + caption[0] + "\n") 53 | for line in caption[1:]: 54 | sys.stdout.write(line) 55 | 56 | # End caption 57 | sys.stdout.write("}\n") 58 | # Add label 59 | sys.stdout.write("\\label{%s}\n"%(label)) 60 | # End figure 61 | sys.stdout.write("\\end{figure}\n\n") 62 | 63 | ################################################################################ 64 | # Extract figure legends 65 | ################################################################################ 66 | 67 | d_figs = {} 68 | for i in range(4): 69 | d_figs[i + 1] = [] 70 | 71 | legend_file = open("figures/figure-legends.tex", "r") 72 | # Skip subsection macro and blank line 73 | legend_file.readline() 74 | legend_file.readline() 75 | 76 | i = 1 77 | for line in legend_file: 78 | if line != "\n": 79 | d_figs[i] = d_figs[i] + [line] 80 | else: 81 | i = i + 1 82 | 83 | ################################################################################ 84 | # Add header 85 | ################################################################################ 86 | 87 | write_file("header-local.tex") 88 | 89 | ################################################################################ 90 | # Begin document 91 | ################################################################################ 92 | 93 | sys.stdout.write(r"\begin{document}" + "\n" + 94 | r"\vspace*{0.35in}" + "\n") 95 | 96 | ################################################################################ 97 | # Add title 98 | ################################################################################ 99 | 100 | title_file = open("title.tex", "r") 101 | title = title_file.read().strip("\n") 102 | 103 | sys.stdout.write(textwrap.dedent(""" 104 | \\begin{flushleft} 105 | {\\Large 106 | \\textbf\\newline{%s} 107 | } 108 | \\newline 109 | %% Insert author names, affiliations and corresponding author email (do not include titles, positions, or degrees). 110 | \\\\ 111 | """%(title) 112 | )) 113 | 114 | ################################################################################ 115 | # Add authors 116 | ################################################################################ 117 | 118 | authors_file = open("authors.tex", "r") 119 | # First skip unnecessary contents needed for Authorea build 120 | for line in authors_file: 121 | if "else" in line: 122 | break 123 | for line in authors_file: 124 | sys.stdout.write(line.lstrip(" ")) 125 | sys.stdout.write("\n") 126 | 127 | sys.stdout.write(r"\end{flushleft}" + "\n\n") 128 | 129 | ################################################################################ 130 | # Introduction 131 | ################################################################################ 132 | 133 | sys.stdout.write(r"\linenumbers" + "\n\n") 134 | 135 | write_file("introduction.tex") 136 | 137 | ################################################################################ 138 | # Version your code 139 | ################################################################################ 140 | 141 | write_file("version-your-code.tex") 142 | 143 | ################################################################################ 144 | # Table 145 | ################################################################################ 146 | 147 | table_file = open("table-1-resources.tex", "r") 148 | # Ignore subsection macro 149 | table_file.readline() 150 | # 151 | sys.stdout.write(""" 152 | \\begin{table}[!ht] 153 | \\begin{adjustwidth}{-1.25in}{0in} % Comment out/remove adjustwidth environment if table fits in text column. 154 | \\caption{ 155 | {\\bf Resources.}} 156 | """ 157 | ) 158 | 159 | for line in table_file: 160 | sys.stdout.write(line) 161 | 162 | sys.stdout.write(""" 163 | \label{tab:resources} 164 | \end{adjustwidth} 165 | \end{table} 166 | """ 167 | ) 168 | 169 | sys.stdout.write("\n") 170 | 171 | ################################################################################ 172 | # Figure 1 and 2 173 | ################################################################################ 174 | 175 | write_figure(d_figs[1], label = "fig:Fig1") 176 | write_figure(d_figs[2], label = "fig:Fig2") 177 | 178 | ################################################################################ 179 | # Share your code 180 | ################################################################################ 181 | 182 | write_file("share-your-code.tex") 183 | 184 | ################################################################################ 185 | # Figure 3 186 | ################################################################################ 187 | 188 | write_figure(d_figs[3], label = "fig:Fig3") 189 | 190 | ################################################################################ 191 | # Contribute to other projects 192 | ################################################################################ 193 | 194 | write_file("contribute-to-other-projects.tex") 195 | 196 | ################################################################################ 197 | # Figure 4 198 | ################################################################################ 199 | 200 | write_figure(d_figs[4], label = "fig:Fig4") 201 | 202 | ################################################################################ 203 | # Conclusion 204 | ################################################################################ 205 | 206 | write_file("conclusion.tex") 207 | 208 | ################################################################################ 209 | # Boxes 210 | ################################################################################ 211 | 212 | for i in range(7): 213 | box_name = glob.glob("box-" + str(i + 1) + "-*tex")[0] 214 | write_file(box_name) 215 | 216 | ################################################################################ 217 | # Methods 218 | ################################################################################ 219 | 220 | write_file("methods.tex") 221 | 222 | ################################################################################ 223 | # References 224 | ################################################################################ 225 | 226 | sys.stdout.write(r"\nolinenumbers" + "\n\n") 227 | write_file("bibliography.bbl") 228 | 229 | ################################################################################ 230 | # Supporting Information Legends 231 | ################################################################################ 232 | 233 | write_file("supporting-information-legends.tex") 234 | 235 | ################################################################################ 236 | # End document 237 | ################################################################################ 238 | 239 | sys.stdout.write(r"\end{document}" + "\n\n") 240 | -------------------------------------------------------------------------------- /code/README.md: -------------------------------------------------------------------------------- 1 | # README 2 | 3 | This subdirectory contains the example scripts to accompany the manuscript. 4 | Read the section [Version your code][version] for the full explanation. 5 | The commands described below should be executed from within the subdirectory `code`. 6 | 7 | [version]: https://www.authorea.com/users/5990/articles/17489/_show_article#article-paragraph-version__minus__your__minus__code__dot__tex-landing-welcome 8 | 9 | ## process.sh 10 | 11 | `process.sh` downloads the ENCODE CTCF ChIP-seq data from multiple types of kidney samples and calls peaks. 12 | The downloaded BAM files and [MACS2][] output are saved in tissue-specific subdirectories in `../data/`. 13 | Run it as follows: 14 | 15 | ```bash 16 | bash process.sh 17 | ``` 18 | 19 | You will need to have Python 2.7 installed because it is a [prerequisite][] for the peak caller [MACS2][]. 20 | To install MACS2, run: 21 | 22 | ```bash 23 | pip install macs2 24 | ``` 25 | 26 | [prerequisite]: https://github.com/taoliu/MACS/blob/master/INSTALL.rst#prerequisites 27 | [MACS2]: https://github.com/taoliu/MACS 28 | 29 | ## clean.py 30 | 31 | `clean.py` filters peaks with a fold change cutoff and merges peaks from the different kidney samples. 32 | It creates the file `../data/sites-union.bed`. 33 | Run it as follows: 34 | 35 | ```bash 36 | python clean.py 37 | ``` 38 | 39 | It can be run with either Python2 or Python3. 40 | You will first need to install [bedtools][] and [pybedtools][]. 41 | See their documentation for instructions, but as an example, this can be accomplished on Ubuntu with the following: 42 | 43 | ```bash 44 | apt-get install bedtools 45 | pip install pybedtools 46 | ``` 47 | 48 | [bedtools]: http://bedtools.readthedocs.org/en/latest/content/installation.html 49 | [pybedtools]: http://pythonhosted.org/pybedtools/main.html 50 | 51 | ## analyze.R 52 | 53 | `analyze.R` creates diagnostic plots on the length of the peaks and their distribution across the genome. 54 | It creates the file `../data/sites-union.pdf`. 55 | Run it as follows: 56 | 57 | ```bash 58 | Rscript analyze.R 59 | ``` 60 | -------------------------------------------------------------------------------- /code/analyze.R: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env Rscript 2 | 3 | # Analyze peak size distribution across chromosomes. 4 | 5 | data_dir <- "../data" 6 | sites <- read.table(file.path(data_dir, "sites-union.bed"), 7 | stringsAsFactors = FALSE) 8 | colnames(sites) <- c("chr", "start", "end") 9 | 10 | sites$chr <- factor(sites$chr, levels = paste0("chr", c(1:22, "X"))) 11 | sites$len <- sites$end - sites$start 12 | sites_per_chr <- table(sites$chr) 13 | 14 | pdf(file.path(data_dir, "sites-union.pdf")) 15 | par(mfrow = c(3, 1)) 16 | hist(sites$len) 17 | boxplot(len ~ chr, data = sites, las = 3) 18 | barplot(sites_per_chr, las = 3) 19 | dev.off() 20 | -------------------------------------------------------------------------------- /code/clean.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | """ 4 | Identify high-quality CTCF binding sites. 5 | 6 | 1. Remove peaks with low fold change in enrichment over control. 7 | 2. Keep only those regions bound by CTCF in all three tissue types. 8 | """ 9 | 10 | import pybedtools 11 | import math 12 | 13 | data = "../data" 14 | 15 | # For details of MACS2 output format: 16 | # https://github.com/taoliu/MACS#output-files 17 | epithelial = pybedtools.BedTool(data + "/epithelial/epithelial_peaks.narrowPeak") 18 | proximal_tube = pybedtools.BedTool(data + "/proximal-tube/proximal-tube_peaks.narrowPeak") 19 | kidney = pybedtools.BedTool(data + "/kidney/kidney_peaks.narrowPeak") 20 | 21 | def filter_fold_change(feature, fc = 1): 22 | """ 23 | Removes peaks with a fold change over the control less than fc. 24 | """ 25 | if float(feature[7]) >= fc: 26 | return True 27 | else: 28 | return False 29 | 30 | # Filter based on fold-change over control sample 31 | fc_cutoff = 10 32 | epithelial = epithelial.filter(filter_fold_change, fc = fc_cutoff).saveas() 33 | proximal_tube = proximal_tube.filter(filter_fold_change, fc = fc_cutoff).saveas() 34 | kidney = kidney.filter(filter_fold_change, fc = fc_cutoff).saveas() 35 | # Identify only those sites that are peaks in all three tissue types 36 | combined = pybedtools.BedTool().multi_intersect( 37 | i = [epithelial.fn, proximal_tube.fn, kidney.fn]) 38 | union = combined.filter(lambda x: int(x[3]) == 3).saveas() 39 | union.cut(range(3)).saveas(data + "/sites-union.bed") 40 | -------------------------------------------------------------------------------- /code/process.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Download bam files and call peaks. 4 | 5 | ENCODE=https://www.encodeproject.org/files 6 | OUTDIR=../data 7 | MACS2="macs2 callpeak -f BAM -g hs" 8 | 9 | ################################################################################ 10 | 11 | echo "Processing kidney epithelial cell data" 12 | # Kidney epithelial cells 13 | # https://www.encodeproject.org/experiments/ENCSR000DVH/ 14 | # Rep 1 - ENCFF001HQY 15 | # Rep 2 - ENCFF001HRF 16 | # Control - ENCFF001HRJ 17 | 18 | # Setup 19 | SUBDIR=$OUTDIR/epithelial 20 | mkdir -p $SUBDIR 21 | 22 | # Download 23 | # $ENCODE/$SAMPLE/@@download/$SAMPLE.bam 24 | if [[ ! -e $SUBDIR/ENCFF001HQY.bam ]] 25 | then 26 | echo "Downloading data" 27 | for SAMPLE in ENCFF001HQY ENCFF001HRF ENCFF001HRJ 28 | do 29 | wget -O $SUBDIR/$SAMPLE.bam $ENCODE/$SAMPLE/@@download/$SAMPLE.bam 30 | done 31 | fi 32 | 33 | # Run MACS2 34 | echo "Running MACS2" 35 | $MACS2 -t $SUBDIR/ENCFF001HQY.bam $SUBDIR/ENCFF001HRF.bam -c $SUBDIR/ENCFF001HRJ.bam \ 36 | -n epithelial --outdir $SUBDIR 37 | 38 | ################################################################################ 39 | 40 | echo "Processing proximal tube data" 41 | # Epithelial cell of proximal tube 42 | # https://www.encodeproject.org/experiments/ENCSR000DXD/ 43 | # Rep 1 - ENCFF001HWB 44 | # Rep 2 - ENCFF001HWC 45 | # Control - ENCFF001HWN 46 | 47 | # Setup 48 | SUBDIR=$OUTDIR/proximal-tube 49 | mkdir -p $SUBDIR 50 | 51 | # Download 52 | # $ENCODE/$SAMPLE/@@download/$SAMPLE.bam 53 | if [[ ! -e $SUBDIR/ENCFF001HWB.bam ]] 54 | then 55 | echo "Downloading data" 56 | for SAMPLE in ENCFF001HWB ENCFF001HWC ENCFF001HWN 57 | do 58 | wget -O $SUBDIR/$SAMPLE.bam $ENCODE/$SAMPLE/@@download/$SAMPLE.bam 59 | done 60 | fi 61 | 62 | # Run MACS2 63 | echo "Running MACS2" 64 | $MACS2 -t $SUBDIR/ENCFF001HWB.bam $SUBDIR/ENCFF001HWC.bam -c $SUBDIR/ENCFF001HWN.bam \ 65 | -n proximal-tube --outdir $SUBDIR 66 | 67 | ################################################################################ 68 | 69 | echo "Processing kidney data" 70 | # kidney 71 | # https://www.encodeproject.org/experiments/ENCSR000DMC/ 72 | # Rep 1 - ENCFF000RWX 73 | # Rep 2 - ENCFF000RWW 74 | # Rep 3 - ENCFF000RWZ 75 | # Control - ENCFF000RXD 76 | 77 | # Setup 78 | SUBDIR=$OUTDIR/kidney 79 | mkdir -p $SUBDIR 80 | 81 | # Download 82 | # $ENCODE/$SAMPLE/@@download/$SAMPLE.bam 83 | if [[ ! -e $SUBDIR/ENCFF000RWX.bam ]] 84 | then 85 | echo "Downloading data" 86 | for SAMPLE in ENCFF000RWX ENCFF000RWW ENCFF000RWZ ENCFF000RXD 87 | do 88 | wget -O $SUBDIR/$SAMPLE.bam $ENCODE/$SAMPLE/@@download/$SAMPLE.bam 89 | done 90 | fi 91 | 92 | # Run MACS2 93 | echo "Running MACS2" 94 | $MACS2 -t $SUBDIR/ENCFF000RWX.bam $SUBDIR/ENCFF000RWW.bam $SUBDIR/ENCFF000RWZ.bam \ 95 | -c $SUBDIR/ENCFF000RXD.bam \ 96 | -n kidney --outdir $SUBDIR 97 | -------------------------------------------------------------------------------- /comments.txt: -------------------------------------------------------------------------------- 1 | 2 | Greg Wilson about 1 month ago · Public 3 | 4 | Explain basic idea of version control software 5 | 6 | Emphasize that it solves two problems at once: managing multi-author collaboration and managing old versions of files. 7 | Greg Wilson about 1 month ago · Public 8 | 9 | (as a single contributor) 10 | 11 | This is the “managing files” half of what VCS does (emphasize that it’s not just for code, and not just for groups). 12 | Greg Wilson about 1 month ago · Public 13 | 14 | previous versions 15 | 16 | I’d add “how to compare to old versions” here before “how to revert” - seeing what you’ve changed (particularly in analysis scripts) is a frequent use case. 17 | Greg Wilson about 1 month ago · Public 18 | 19 | Using version control online 20 | 21 | Because keeping history on your working machine (e.g., your laptop) is just asking for trouble - single point of failure. 22 | Greg Wilson about 1 month ago · Public 23 | 24 | collaborators 25 | 26 | Including yourself on your other machine(s) or when you’re traveling or... 27 | Greg Wilson about 1 month ago · Public 28 | 29 | Pretty sure Figure 2 is going to scare people, but building up to it in a series of ever-more-complex diagrams might help. 30 | Greg Wilson about 1 month ago · Public 31 | 32 | Another box: what is version control *not* good for? (Answer: big data files that never change, binary files (including Word and Excel)) 33 | John Blischak about 1 month ago · Public 34 | 35 | Thanks for the feedback, Greg. I’ve incorporated many of your suggestions into the outline. The other suggestions we can incorporate when writing the actual text for each of the sections. 36 | Francis Ouellette about 1 month ago · Public 37 | 38 | Introduction to version control 39 | 40 | Maybe add: who uses it, why they use it, and added benefits, makes it easy to share code, makes it easier for people to contribute code to a project. About Openess, and how it is useful of the reproducibility of science 41 | Francis Ouellette about 1 month ago · Public 42 | 43 | Introduction to version control 44 | 45 | Also want to introduce difference between git and github (I know it’s simple, but many will need some hand holding). 46 | Francis Ouellette about 1 month ago · Public 47 | 48 | Potential box (or table) ideas 49 | 50 | Maybe some example (link to) of very simple, well known git repo? So people can see what it looks like in real? 51 | Francis Ouellette about 1 month ago · Public 52 | 53 | Other version control systems and hosting sites 54 | 55 | Would you add pro and cons to these? 56 | Francis Ouellette about 1 month ago · Public 57 | 58 | What not to version control? Large, static data files; binary files like Word 59 | 60 | yes, good idea! 61 | John Blischak about 1 month ago · Public 62 | 63 | Thanks for the suggestions, Francis. 64 | 65 | * On the added benefits of using Git, I was planning on addressing your suggestions in the section “Why is it so powerful?” 66 | 67 | * On the difference between Git and GitHub. While this will likely receive a short blurb in the intro, I was planning on making that distinction clear during the transition from section 2 (using Git to track your code) to section 3 (hosting your code on GitHub). 68 | 69 | * On having good examples of GitHub repos. That is a great idea! 70 | 71 | * On pros and cons of other tools. I’d prefer to stay away from this issue because the reasons for a tools popularity is not always because it is objectively better. Often the best tool to learn is the one that your colleagues are using. Git and GitHub currently have the strongest foothold in terms of number of users, but the benefits of version control we’ll describe in this tutorial equally apply to other distributed version control setups, e.g. using Mercurial and hosting with Bitbucket. 72 | 73 | ## Greg's comments on section version-your-code.tex 74 | 75 | 76 | Greg Wilson 13 days ago · Public 77 | 78 | There are many graphical user interfaces (GUIs) available for running Git (Table 1), which we encourage you to explore, but learning to use Git on the command line is necessary for performing more advanced operations and using Git on a remote machine. 79 | 80 | Callout box? 81 | Greg Wilson 13 days ago · Public 82 | 83 | or the purpose 84 | 85 | start new paragraph 86 | Greg Wilson 13 days ago · Public 87 | 88 | initiates 89 | 90 | initializes, not initiates, and the partial italics are hard to read 91 | Greg Wilson 13 days ago · Public 92 | 93 | This requires a basic understanding of how Git tracks your files and the edits you make to them 94 | 95 | Delete - nobody would think you could use Git without understanding it. 96 | Greg Wilson 13 days ago · Public 97 | 98 | notice 99 | 100 | used ’notice’ in preceding sentence 101 | Greg Wilson 13 days ago · Public 102 | 103 | which is an essential Git term 104 | 105 | remove 106 | Greg Wilson 13 days ago · Public 107 | 108 | $ git add process.sh $ git status 109 | 110 | Put git add and git status in separate boxes to make it clearer that there are two separate commands here (people won’t see them otherwise). 111 | Greg Wilson 13 days ago · Public 112 | 113 | staging area 114 | 115 | analogy: putting stuff in the staging area is like putting things in a box to mail off; committing is like putting the box in the mail. 116 | Greg Wilson 13 days ago · Public 117 | 118 | you will be entered into 119 | 120 | awkward 121 | Greg Wilson 13 days ago · Public 122 | 123 | , usually vi or emacs, 124 | 125 | remove 126 | Greg Wilson 13 days ago · Public 127 | 128 | identification (ID; note that in Git terminology it referred to as the SHA-1 checksum) 129 | 130 | the unique identifier for that revision [no need to talk about checksums] 131 | Greg Wilson 13 days ago · Public 132 | 133 | “# Removes samples with more than 5% missing data” 134 | 135 | difficult to parse inline - can you instead show a few made-up lines of code with the change highlighted? 136 | Greg Wilson 13 days ago · Public 137 | 138 | running the command git diff. 139 | 140 | difficult to understand the diff if we haven’t seen the code before and after. 141 | Greg Wilson 13 days ago · Public 142 | 143 | diff output is really confusing - can you show a screenshot of a two-pane diff viewer like WinDiff or DiffMerge as well? 144 | Greg Wilson 13 days ago · Public 145 | 146 | As expected, 147 | 148 | Most of the output of ’git diff’ is *NOT* expected - the index line, the @@ lines, etc. are really confusing. 149 | Greg Wilson 13 days ago · Public 150 | 151 | -- clean.py 152 | 153 | need to explain the double dash. 154 | Greg Wilson 13 days ago · Public 155 | 156 | 660213b91af167d992885e45ab19f585f02d4661 157 | 158 | whoa - tell them that they only need the first few digits, please :-) 159 | 160 | ## Greg's comments on share-your-code.tex 161 | 162 | 163 | Greg Wilson 13 days ago · Public 164 | 165 | referred to as a repository 166 | 167 | hadn’t noticed that ’repository’ wasn’t introduced earlier - should be... 168 | Greg Wilson 13 days ago · Public 169 | 170 | alias 171 | 172 | 1. Tell people that a remote is just a bookmark. 2. Don’t introduce yet another term (alias) for the same idea. 173 | Greg Wilson 13 days ago · Public 174 | 175 | , followed by the name of the branch name “master”. Branches are parallel versions of the code, but we will not cover them in depth in this tutorial (Box 2). 176 | 177 | The word “master” tells Git that we’re pushing the master copy of the repository - we won’t go into other options in this tutorial, but Box 2 discusses them briefly. [i.e., let’s avoid talking about branches unless we’re actually going to talk about branches] 178 | -------------------------------------------------------------------------------- /compile-to-pdf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Compile tex to pdf 4 | 5 | TEX=$1 6 | 7 | BASE=${TEX%.tex} 8 | 9 | # Number the figures 10 | latex $BASE 11 | # Add the bibliography 12 | bibtex $BASE 13 | # Number the in-text citations 14 | latex $BASE 15 | latex $BASE 16 | # Convert to pdf 17 | dvipdf $BASE 18 | -------------------------------------------------------------------------------- /conclusion.tex: -------------------------------------------------------------------------------- 1 | \section*{Conclusion} 2 | 3 | Git, albeit complicated at first, is a powerful tool that can improve code development and documentation. 4 | Ultimately the complexity of a VCS not only gives users a well-documented ``undo'' button for their analyses, but it also allows for collaboration and sharing of code on a massive scale. 5 | Furthermore, it does not need to be learned in its entirety to be useful. 6 | Instead, you can derive tangible benefits from adopting version control in stages. 7 | With a few commands (\verb|git init|, \verb|git add|, \verb|git commit|), you can start tracking your code development and avoid a filesystem full of copied files (Fig. \ref{fig:Fig2}). 8 | Adding a few additional commands (\verb|git push|, \verb|git clone|, \verb|git pull|) and a GitHub account, you can share your code online, transfer your changes across machines, and collaborate in small groups (Fig. \ref{fig:Fig3}). 9 | Lastly, by forking public repositories and sending pull requests, you can directly improve scientific software (Fig. \ref{fig:Fig4}). 10 | -------------------------------------------------------------------------------- /contribute-to-other-projects.tex: -------------------------------------------------------------------------------- 1 | \section*{Contribute to other projects} 2 | 3 | Lots of scientific software is hosted online in Git repositories. 4 | Now that you know the basics of Git, you can directly contribute to developing the scientific software you use for your research (Fig. \ref{fig:Fig4}). 5 | From a small contribution like fixing a typo in the documentation to a larger change such as fixing a bug, it is empowering to be able to improve the software used by you and many other scientists. 6 | 7 | When contributing to a larger project with many contributors, you will not be able to push your changes with \verb|git push| directly to the project's remote repository. 8 | Instead you will first need to create your own remote copy of the repository, which on GitHub is called a fork (Box 1). 9 | You can fork any repository on GitHub by clicking the button ``Fork'' on the top right of the page (see \href{https://help.github.com/articles/fork-a-repo/}{help.github.com/articles/fork-a-repo}). 10 | 11 | Once you have a fork of a project's repository, you can clone it to your computer and make changes just like a repository you created yourself. 12 | As an exercise, you will add a file to the repository that we used to write this paper. 13 | First, go to \href{https://github.com/jdblischak/git-for-science}{github.com/jdblischak/git-for-science} and choose the ``Fork'' option to create a git-for-science repository under your GitHub account (Fig. \ref{fig:Fig4}B). 14 | In order to make changes, download it to your computer with the command \verb|git clone| from the directory you wish the repo to appear in (Fig. \ref{fig:Fig4}C). 15 | 16 | \begin{verbatim} 17 | $ git clone https://github.com/username/git-for-science.git 18 | \end{verbatim} 19 | 20 | Now that you have a local version, navigate to the subdirectory \verb|readers| and create a text file named as your GitHub username (Fig. \ref{fig:Fig4}D). 21 | 22 | \begin{verbatim} 23 | $ cd git-for-science/readers 24 | $ touch username.txt 25 | \end{verbatim} 26 | 27 | Add and commit this new file (Fig. \ref{fig:Fig4}D), and then push the changes back to your remote repository on GitHub (Fig. \ref{fig:Fig4}E). 28 | 29 | \begin{verbatim} 30 | $ git add username.txt 31 | $ git commit -m "Add username to directory of readers." 32 | $ git push origin master 33 | \end{verbatim} 34 | 35 | Currently, the new file you created, \verb|readers/username.txt|, only exists in your fork of git-for-science. 36 | To merge this file into the main repository, send a pull request using the GitHub interface (Pull request -\textgreater New pull request -\textgreater Create pull request; Fig. \ref{fig:Fig4}F; see \href{https://help.github.com/articles/using-pull-requests/}{help.github.com/articles/using-pull-requests}). 37 | After the pull request is created, we can review your change and then merge it into the main repository. 38 | Although this process of forking a project’s repository and issuing a pull request seems like a lot of work to contribute changes, this workflow gives the owner of a project control over what changes get incorporated into the code. 39 | You can have others contribute to your projects using the same workflow. 40 | 41 | The ability to use Git to contribute changes is very powerful because it allows you to improve the software that is used by many other scientists and also potentially shape the future direction of its development. 42 | -------------------------------------------------------------------------------- /create-diff-file.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # A file with changes highlighted is required for resubmission. 4 | 5 | # Usage: 6 | # 7 | # bash create-diff-file.sh TAG IN_NAME OUT_NAME 8 | # 9 | # TAG: The name of the tag of the previous version (must be on GitHub) 10 | # IN_NAME: The name of the tex file to compare 11 | # OUT_NAME: The name of the tex file with changes highlighted 12 | # 13 | # Examples: 14 | # 15 | # # For the first revision: 16 | # bash create-diff-file.sh 2015-05-08 blischak-et-al-2015.tex diff.tex 17 | # 18 | # # For the second revision: 19 | # bash create-diff-file.sh 2015-08-27-revision blischak-et-al-2015.tex diff2.tex 20 | 21 | TAG=$1 22 | IN_NAME=$2 23 | OUT_NAME=$3 24 | 25 | # Download version of repo from TAG 26 | if [[ -f $TAG.zip ]] 27 | then 28 | echo "$TAG was already downloaded" 29 | else 30 | wget https://github.com/jdblischak/git-for-science/archive/$TAG.zip 31 | unzip $TAG.zip 32 | fi 33 | 34 | # The following only needs to be applied to the original sumbission. 35 | # Change the lstlisting sections to verbatim. 36 | # Otherwise the file output by latexdiff cannot be compiled. 37 | if [[ $TAG == 2015-05-08 ]] 38 | then 39 | sed -i s/lstlisting/verbatim/g git-for-science-$TAG/$IN_NAME 40 | fi 41 | 42 | # Create tex file with differences highlighted 43 | latexdiff git-for-science-$TAG/$IN_NAME $IN_NAME > $OUT_NAME 44 | 45 | # Compile diff.tex 46 | bash compile-to-pdf.sh $OUT_NAME 47 | -------------------------------------------------------------------------------- /diff.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/diff.pdf -------------------------------------------------------------------------------- /diff2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/diff2.pdf -------------------------------------------------------------------------------- /figure-legends.tex: -------------------------------------------------------------------------------- 1 | \section*{Figure Legends} 2 | 3 | \textbf{Figure \ref{fig:Fig1}. The git add/commit process.} 4 | To store a snapshot of changes in your repository, first \verb|git add| any files to the staging area you wish to commit (for example, you've updated the \verb|process.sh| file). 5 | Second, type \verb|git commit| with a message. Only files added to the staging area will be committed. 6 | All past commits are located in the hidden \verb|.git| directory in your repository. 7 | 8 | \textbf{Figure \ref{fig:Fig2}. Working with a local repository.} 9 | A) To designate a directory on your computer as a Git repo, type the command \verb|git init|. 10 | This initializes the repository and will allow you to track the files located within that directory. 11 | B) Once you have added a file, follow the git add/commit cycle to place the new file first into the staging area by typing \verb|git add| to designate it to be committed, and then \verb|git commit| to take the shapshot of that file. 12 | The commit is assigned a commit identifier (d75es) that can be used in the future to pull up this version or to compare different committed versions of this file. 13 | C) As you continue to add and change files, you should regularly add and commit those changes. 14 | Here, an additional commit was done and the commit log now shows two commit identifiers: d75es (from step B) and f658t (the new commit). 15 | Each commit will generate a unique identifier, which can be examined in reverse chronological order using \verb|git log|. 16 | 17 | \textbf{Figure \ref{fig:Fig3}. Working with both a local and remote repository as a single user.} 18 | A) On your computer you commit to a Git repository (commit d75es). 19 | B) On GitHub, you create a new repository called \verb|thesis|. 20 | This repository is currently empty and not linked to the repo on your local machine. 21 | C) The command \verb|git remote add| connects your local repository to your remote repository. 22 | The remote repository is still empty, however, because you have not pushed any content to it. 23 | D) You send all the local commits to the remote repository using the command \verb|git push|. 24 | Only files that have been committed will appear in the remote repository. 25 | E) You repeat several more rounds of updating scripts and committing on your local computer (commit f658t and then commit xv871). 26 | You have not yet pushed these commits to the remote repository, so only the previously pushed commit is in the remote repo (commit d75es). 27 | F) To bring the remote repository up-to-date with your local repository, you \verb|git push| the two new commits to the remote repository. 28 | The local and remote repositories now contain the same files and commit histories. 29 | 30 | \textbf{Figure \ref{fig:Fig4}. Contributing to Open Source Projects.} 31 | We would like you to add an empty file that is named after your GitHub username to the repo used to write this manuscript. 32 | A) Using your internet browser, navigate to \href{https://github.com/jdblischak/git-for-science}{github.com/jdblischak/git-for-science}. 33 | B) Click on the ``Fork'' button to create a copy of this repo on GitHub under your username. 34 | C) On your computer, type \verb|git clone https://github.com/username/git-for-science.git|, which will create a copy of git-for-science on your local machine. 35 | D) Navigate to the \verb|readers| directory by typing \verb|cd git-for-science/readers/|. 36 | Create an empty file that is titled with your GitHub username by typing \verb|touch username.txt|. 37 | Commit that new file by adding it to the staging area (\verb|git add username.txt|) and committing with a message (\verb|git commit -m "Add username to directory of readers."|). 38 | Note that your commit identifier will be different than what is shown here. 39 | E) You have committed your new file locally and the next step is to push that new commit up to the git-for-science repo under your username on GitHub. 40 | To do so, type \verb|git push origin master|. 41 | F) To request to add your commits to the original git-for-science repo, issue a pull request from the git-for-science repo under your username on GitHub. 42 | Once your Pull Request is reviewed and accepted, you will be able to see the file you committed with your username in the original git-for-science repository. 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /figures/.placeholder.md: -------------------------------------------------------------------------------- 1 | this is a placeholder for the directory -------------------------------------------------------------------------------- /figures/Fig1/Fig1.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig1/Fig1.eps -------------------------------------------------------------------------------- /figures/Fig1/Fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig1/Fig1.png -------------------------------------------------------------------------------- /figures/Fig1/Fig1.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig1/Fig1.tif -------------------------------------------------------------------------------- /figures/Fig1/caption.tex: -------------------------------------------------------------------------------- 1 | \textbf{\label{fig:Fig1}} -------------------------------------------------------------------------------- /figures/Fig1/size.tex: -------------------------------------------------------------------------------- 1 | height = 1050\nwidth = 750 2 | -------------------------------------------------------------------------------- /figures/Fig2/Fig2.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig2/Fig2.eps -------------------------------------------------------------------------------- /figures/Fig2/Fig2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig2/Fig2.png -------------------------------------------------------------------------------- /figures/Fig2/Fig2.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig2/Fig2.tif -------------------------------------------------------------------------------- /figures/Fig2/caption.tex: -------------------------------------------------------------------------------- 1 | \textbf{\label{fig:Fig2}} 2 | -------------------------------------------------------------------------------- /figures/Fig2/size.tex: -------------------------------------------------------------------------------- 1 | height = 700\nwidth = 500 -------------------------------------------------------------------------------- /figures/Fig3/Fig3.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig3/Fig3.eps -------------------------------------------------------------------------------- /figures/Fig3/Fig3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig3/Fig3.png -------------------------------------------------------------------------------- /figures/Fig3/Fig3.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig3/Fig3.tif -------------------------------------------------------------------------------- /figures/Fig3/caption.tex: -------------------------------------------------------------------------------- 1 | \textbf{\label{fig:Fig3}} 2 | -------------------------------------------------------------------------------- /figures/Fig3/size.tex: -------------------------------------------------------------------------------- 1 | height = 700\nwidth = 500 -------------------------------------------------------------------------------- /figures/Fig4/Fig4.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig4/Fig4.eps -------------------------------------------------------------------------------- /figures/Fig4/Fig4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig4/Fig4.png -------------------------------------------------------------------------------- /figures/Fig4/Fig4.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/Fig4/Fig4.tif -------------------------------------------------------------------------------- /figures/Fig4/caption.tex: -------------------------------------------------------------------------------- 1 | \textbf{\label{fig:Fig4}} -------------------------------------------------------------------------------- /figures/Fig4/size.tex: -------------------------------------------------------------------------------- 1 | height = 700\nwidth = 500 -------------------------------------------------------------------------------- /figures/S1_Fig/S1_Fig.eps: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/S1_Fig/S1_Fig.eps -------------------------------------------------------------------------------- /figures/S1_Fig/S1_Fig.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/figures/S1_Fig/S1_Fig.png -------------------------------------------------------------------------------- /figures/S1_Fig/caption.tex: -------------------------------------------------------------------------------- 1 | \textbf{\label{fig:S1_Fig}} 2 | 3 | \textbf{Figure \ref{fig:S1_Fig}. Collaboration using GitHub.} 4 | A) You have a repository on your computer and on GitHub that you have already connected using \verb|git remote add|, but you have not pushed any content to the remote repo yet. 5 | B) You push your local commits to your remote repository using \verb|git push| (both your local and your remote have commit d75es). 6 | C) Your collaborator would like to help you analyze your data. 7 | They make a copy of your remote repository into their GitHub account using the ``fork'' option in GitHub. 8 | All three repositories have the same version history (commit d75es). 9 | D) Your collaborator wants a copy of the repository on their local computer so they can make edits. 10 | They \verb|git clone| the repository from their remote GitHub account. 11 | E) Your collaborator edits a file and commits a change to their local repository (commit t957s). 12 | Changes are not automatically shared across all repositories, therefore your local, your remote, and your collaborator's remote only have commit d75es. 13 | F) Your collaborator syncs their local repo with their remote repo by pushing. 14 | Now both your collaborator's local and remote repositories have two commits (commit d75es and commit t957s), while your local and remote only have one (commit d75es). 15 | G) Unaware of what your collaborator is doing, you continue to work on your code and you make a new commit locally (commit f658t). 16 | H) Your collaborator wants you to incorporate their changes into your code, so from GitHub they issue a Pull Request. 17 | The changes are acceptable, so you confirm the Pull Request and merge the changes into your remote repository. 18 | Your remote repository is ahead of your local repository by one commit: the commit your collaborator made (commit t957s) 19 | In addition your local repository is ahead of your remote repository by one commit that was made before the Pull Request was issued by your collaborator (commit f658t). 20 | I) To incorporate the new commit from your collaborator into your local repository, you \verb|git pull| commits from your remote to your local repository. 21 | Your local now has the commit from your collaborator incorporated, but is still ahead of your remote by one commit. 22 | You could \verb|git push| your changes to sync your remote and local repositories. 23 | -------------------------------------------------------------------------------- /figures/S1_Fig/size.tex: -------------------------------------------------------------------------------- 1 | width=1000 -------------------------------------------------------------------------------- /header-local.tex: -------------------------------------------------------------------------------- 1 | % header file used for building locally 2 | 3 | % Template for PLoS 4 | % Version 3.1 February 2015 5 | % 6 | % To compile to pdf, run: 7 | % latex plos.template 8 | % bibtex plos.template 9 | % latex plos.template 10 | % latex plos.template 11 | % dvipdf plos.template 12 | % 13 | % % % % % % % % % % % % % % % % % % % % % % 14 | % 15 | % -- IMPORTANT NOTE 16 | % 17 | % This template contains comments intended 18 | % to minimize problems and delays during our production 19 | % process. Please follow the template instructions 20 | % whenever possible. 21 | % 22 | % % % % % % % % % % % % % % % % % % % % % % % 23 | % 24 | % Once your paper is accepted for publication, 25 | % PLEASE REMOVE ALL TRACKED CHANGES in this file and leave only 26 | % the final text of your manuscript. 27 | % 28 | % There are no restrictions on package use within the LaTeX files except that 29 | % no packages listed in the template may be deleted. 30 | % 31 | % Please do not include colors or graphics in the text. 32 | % 33 | % Please do not create a heading level below \subsection. For 3rd level headings, use \paragraph{}. 34 | % 35 | % % % % % % % % % % % % % % % % % % % % % % % 36 | % 37 | % -- FIGURES AND TABLES 38 | % 39 | % Please include tables/figure captions directly after the paragraph where they are first cited in the text. 40 | % 41 | % DO NOT INCLUDE GRAPHICS IN YOUR MANUSCRIPT 42 | % - Figures should be uploaded separately from your manuscript file. 43 | % - Figures generated using LaTeX should be extracted and removed from the PDF before submission. 44 | % - Figures containing multiple panels/subfigures must be combined into one image file before submission. 45 | % For figure citations, please use "Fig." instead of "Figure". 46 | % See http://www.plosone.org/static/figureGuidelines for PLOS figure guidelines. 47 | % 48 | % Tables should be cell-based and may not contain: 49 | % - tabs/spacing/line breaks within cells to alter layout or alignment 50 | % - vertically-merged cells (no tabular environments within tabular environments, do not use \multirow) 51 | % - colors, shading, or graphic objects 52 | % See http://www.plosone.org/static/figureGuidelines#tables for table guidelines. 53 | % 54 | % For tables that exceed the width of the text column, use the adjustwidth environment as illustrated in the example table in text below. 55 | % 56 | % % % % % % % % % % % % % % % % % % % % % % % % 57 | % 58 | % -- EQUATIONS, MATH SYMBOLS, SUBSCRIPTS, AND SUPERSCRIPTS 59 | % 60 | % IMPORTANT 61 | % Below are a few tips to help format your equations and other special characters according to our specifications. For more tips to help reduce the possibility of formatting errors during conversion, please see our LaTeX guidelines at http://www.plosone.org/static/latexGuidelines 62 | % 63 | % Please be sure to include all portions of an equation in the math environment. 64 | % 65 | % Do not include text that is not math in the math environment. For example, CO2 will be CO\textsubscript{2}. 66 | % 67 | % Please add line breaks to long display equations when possible in order to fit size of the column. 68 | % 69 | % For inline equations, please do not include punctuation (commas, etc) within the math environment unless this is part of the equation. 70 | % 71 | % % % % % % % % % % % % % % % % % % % % % % % % 72 | % 73 | % Please contact latex@plos.org with any questions. 74 | % 75 | % % % % % % % % % % % % % % % % % % % % % % % % 76 | 77 | \documentclass[10pt,letterpaper]{article} 78 | \usepackage[top=0.85in,left=2.75in,footskip=0.75in]{geometry} 79 | 80 | % Use adjustwidth environment to exceed column width (see example table in text) 81 | \usepackage{changepage} 82 | 83 | % Use Unicode characters when possible 84 | \usepackage[utf8]{inputenc} 85 | 86 | % textcomp package and marvosym package for additional characters 87 | \usepackage{textcomp,marvosym} 88 | 89 | % fixltx2e package for \textsubscript 90 | \usepackage{fixltx2e} 91 | 92 | % amsmath and amssymb packages, useful for mathematical formulas and symbols 93 | \usepackage{amsmath,amssymb} 94 | 95 | % cite package, to clean up citations in the main text. Do not remove. 96 | \usepackage{cite} 97 | 98 | % Use nameref to cite supporting information files (see Supporting Information section for more info) 99 | \usepackage{nameref,hyperref} 100 | 101 | % line numbers 102 | \usepackage[right]{lineno} 103 | 104 | % ligatures disabled 105 | \usepackage{microtype} 106 | \DisableLigatures[f]{encoding = *, family = * } 107 | 108 | % rotating package for sideways tables 109 | \usepackage{rotating} 110 | 111 | % include \verb macros in \caption of figures 112 | % http://tex.stackexchange.com/a/8814 113 | \usepackage{cprotect} 114 | 115 | % Remove comment for double spacing 116 | %\usepackage{setspace} 117 | %\doublespacing 118 | 119 | % Text layout 120 | \raggedright 121 | \setlength{\parindent}{0.5cm} 122 | \textwidth 5.25in 123 | \textheight 8.75in 124 | 125 | % Bold the 'Figure #' in the caption and separate it from the title/caption with a period 126 | % Captions will be left justified 127 | \usepackage[aboveskip=1pt,labelfont=bf,labelsep=period,justification=raggedright,singlelinecheck=off]{caption} 128 | 129 | % Use the PLoS provided BiBTeX style 130 | \bibliographystyle{plos2015} 131 | 132 | % Remove brackets from numbering in List of References 133 | \makeatletter 134 | \renewcommand{\@biblabel}[1]{\quad#1.} 135 | \makeatother 136 | 137 | % Leave date blank 138 | \date{} 139 | 140 | % Header and Footer with logo 141 | \usepackage{lastpage,fancyhdr,graphicx} 142 | \usepackage{epstopdf} 143 | \pagestyle{myheadings} 144 | \pagestyle{fancy} 145 | \fancyhf{} 146 | \lhead{\includegraphics[width=2.0in]{PLOS-submission.eps}} 147 | \rfoot{\thepage/\pageref{LastPage}} 148 | \renewcommand{\footrule}{\hrule height 2pt \vspace{2mm}} 149 | \fancyheadoffset[L]{2.25in} 150 | \fancyfootoffset[L]{2.25in} 151 | \lfoot{\sf PLOS} 152 | 153 | %% Include all macros below 154 | 155 | \newcommand{\lorem}{{\bf LOREM}} 156 | \newcommand{\ipsum}{{\bf IPSUM}} 157 | 158 | %% END MACROS SECTION 159 | -------------------------------------------------------------------------------- /introduction.tex: -------------------------------------------------------------------------------- 1 | \section*{Introduction to version control} 2 | 3 | Many scientists write code as part of their research. 4 | Just as experiments are logged in laboratory notebooks, it is important to document the code you use for analysis. 5 | However, a few key problems can arise when iteratively developing code that make it difficult to document and track which code version was used to create each result. 6 | First, you often need to experiment with new ideas, such as adding new features to a script or increasing the speed of a slow step, but you do not want to risk breaking the currently working code. 7 | One often utilized solution is to make a copy of the script before making new edits. 8 | However, this can quickly become a problem because it clutters your filesystem with uninformative filenames, e.g. \verb|analysis.sh|, \verb|analysis_02.sh|, \verb|analysis_03.sh|, etc. 9 | It is difficult to remember the differences between the versions of the files, and more importantly which version you used to produce specific results, especially if you return to the code months later. 10 | Second, you will likely share your code with multiple lab mates or collaborators and they may have suggestions on how to improve it. 11 | If you email the code to multiple people, you will have to manually incorporate all the changes each of them sends. 12 | 13 | Fortunately, software engineers have already developed software to manage these issues: version control. 14 | A version control system (VCS) allows you to track the iterative changes you make to your code. 15 | Thus you can experiment with new ideas but always have the option to revert to a specific past version of the code you used to generate particular results. 16 | Furthermore, you can record messages as you save each successive version so that you (or anyone else) reviewing the development history of the code is able to understand the rationale for the given edits. 17 | Also, it facilitates collaboration. 18 | Using a VCS, your collaborators can make and save changes to the code, and you can automatically incorporate these changes to the main code base. 19 | The collaborative aspect is enhanced with the emergence of websites that host version controlled code. 20 | 21 | In this quick guide, we introduce you to one VCS, Git (\href{https://git-scm.com/}{git-scm.com}), and one online hosting site, GitHub (\href{https://github.com}{github.com}), both of which are currently popular among scientists and programmers in general. 22 | More importantly, we hope to convince you that although mastering a given VCS takes time, you can already achieve great benefits by getting started using a few simple commands. 23 | Furthermore, not only does using a VCS solve many common problems when writing code, it can also improve the scientific process. 24 | By tracking your code development with a VCS and hosting it online, you are performing science that is more transparent, reproducible, and open to collaboration \cite{23448176, 24415924}. 25 | There is no reason this framework needs to be limited only to code; a VCS is well-suited for tracking any plain-text files: manuscripts, electronic lab notebooks, protocols, etc. 26 | -------------------------------------------------------------------------------- /layout.md: -------------------------------------------------------------------------------- 1 | introduction.tex 2 | version-your-code.tex 3 | share-your-code.tex 4 | contribute-to-other-projects.tex 5 | conclusion.tex 6 | methods.tex 7 | table-1-resources.tex 8 | box-1-definitions.tex 9 | box-2-what-not-to-version-control.tex 10 | box-3-managing-large-files.tex 11 | box-4-licensing.tex 12 | box-5-being-scooped.tex 13 | box-6-sharing-policies.tex 14 | box-7-branching.tex 15 | figure-legends.tex 16 | supporting-information-legends.tex 17 | figures/Fig1/Fig1.png 18 | figures/Fig2/Fig2.png 19 | figures/Fig3/Fig3.png 20 | figures/Fig4/Fig4.png 21 | 22 | -------------------------------------------------------------------------------- /methods.tex: -------------------------------------------------------------------------------- 1 | \section*{Methods} 2 | 3 | We collaboratively wrote the article in LaTeX (\href{http://www.latex-project.org/}{latex-project.org}) using the online authoring platform Authorea (\href{https://www.authorea.com}{authorea.com}). 4 | Furthermore, we tracked the development of the document using Git and GitHub. 5 | The Git repo is available at \href{https://github.com/jdblischak/git-for-science}{github.com/jdblischak/git-for-science}, and the rendered LaTeX article is available at \href{https://www.authorea.com/users/5990/articles/17489}{authorea.com/users/5990/articles/17489}. 6 | -------------------------------------------------------------------------------- /plos2015.bst: -------------------------------------------------------------------------------- 1 | %% 2 | %% 3 | %% 4 | %% 5 | %% This `plos2015.bst' file is intended for use in PLOS submissions to 6 | %% correctly compile the bibliography according to the PLOS manuscript 7 | %% guidelines updated January 2015. 8 | %% 9 | %% 10 | %% This is derived from the `vancouver.bst' bibliographic style file (for 11 | %% LaTeX/BibTeX), generated with the docstrip utility and modified manually 12 | %% to meet the 13 | %% ``Uniform Requirements for Manuscripts Submitted to Biomedical Journals'' 14 | %% as published in N Engl J Med 1997;336:309-315. 15 | %% (also known as the Vancouver style) 16 | %% This specification may be found on the web page of the 17 | %% International Committe of Medical Journal Editors: 18 | %% 19 | %% http://www.icmje.org 20 | %% 21 | %%------------------------------------------------------------------- 22 | %% 23 | %% Copyright 2004 Folkert van der Beek 24 | %% 25 | %% This work may be distributed and/or modified under the 26 | %% conditions of the LaTeX Project Public License, either version 1.3 27 | %% of this license or (at your option) any later version. 28 | %% The latest version of this license is in 29 | %% http://www.latex-project.org/lppl.txt 30 | %% and version 1.3 or later is part of all distributions of LaTeX 31 | %% version 2005/12/01 or later. 32 | %% 33 | %% This work has the LPPL maintenance status `maintained'. 34 | %% 35 | %% The Current Maintainer of this work is Folkert van der Beek. 36 | %% 37 | %% Complaints, suggestions and comments may be sent to 38 | %% 39 | %% Folkert van der Beek 40 | %% 41 | %%------------------------------------------------------------------- 42 | %% 43 | %% This bibliography style file is intended for texts in ENGLISH 44 | %% This is a numerical citation style, and as such is standard LaTeX. 45 | %% It requires no extra package to interface to the main text. 46 | %% The form of the \bibitem entries is 47 | %% \bibitem{key}... 48 | %% Usage of \cite is as follows: 49 | %% \cite{key} ==>> [#] 50 | %% \cite[chap. 2]{key} ==>> [#, chap. 2] 51 | %% where # is a number determined by the ordering in the reference list. 52 | %% The order in the reference list is that by which the works were originally 53 | %% cited in the text, or that in the database. 54 | % 55 | %% To change the reference numbering system from [1] to 1, 56 | %% put the following code in the preamble: 57 | %% \makeatletter % Reference list option change 58 | %% \renewcommand\@biblabel[1]{#1} % from [1] to 1 59 | %% \makeatother % 60 | %% 61 | %%--------------------------------------------------------------------- 62 | 63 | %% List of all possible fields 64 | ENTRY 65 | { address 66 | assignee % for patents 67 | author 68 | booktitle % for articles in books 69 | chapter % for incollection, esp. internet documents 70 | cartographer % for maps 71 | day 72 | edition 73 | editor 74 | howpublished 75 | institution % for technical reports 76 | inventor % for patents 77 | journal 78 | key 79 | month 80 | note 81 | number 82 | organization 83 | pages 84 | part 85 | publisher 86 | school 87 | series 88 | title 89 | type 90 | volume 91 | word 92 | year 93 | eprint % urlbst 94 | doi % urlbst 95 | url % urlbst 96 | lastchecked % urlbst 97 | updated % urlbst 98 | } 99 | {} 100 | { label } 101 | %% Declaration of integer variables 102 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } 103 | STRINGS { urlintro eprinturl eprintprefix doiprefix doiurl } % urlbst... 104 | INTEGERS { hrefform addeprints adddoiresolver } 105 | % Following constants may be adjusted by hand, if desired 106 | FUNCTION {init.config.constants} 107 | { 108 | "Available from: " 'urlintro := % prefix before URL 109 | "http://arxiv.org/abs/" 'eprinturl := % prefix to make URL from eprint ref 110 | "arXiv:" 'eprintprefix := % text prefix printed before eprint ref 111 | "http://dx.doi.org/" 'doiurl := % prefix to make URL from DOI 112 | "doi:" 'doiprefix := % text prefix printed before DOI ref 113 | #0 'addeprints := % 0=no eprints; 1=include eprints 114 | #0 'adddoiresolver := % 0=no DOI resolver; 1=include it 115 | #0 'hrefform := % 0=no crossrefs; 1=hypertex xrefs; 2=hyperref refs 116 | } 117 | INTEGERS { 118 | bracket.state 119 | outside.brackets 120 | open.brackets 121 | within.brackets 122 | close.brackets 123 | } 124 | % ...urlbst to here 125 | FUNCTION {init.state.consts} 126 | { #0 'outside.brackets := % urlbst 127 | #1 'open.brackets := 128 | #2 'within.brackets := 129 | #3 'close.brackets := 130 | 131 | #0 'before.all := 132 | #1 'mid.sentence := 133 | #2 'after.sentence := 134 | #3 'after.block := 135 | } 136 | %% Declaration of string variables 137 | STRINGS { s t} 138 | 139 | % urlbst 140 | FUNCTION {output.nonnull.original} 141 | { 's := 142 | output.state mid.sentence = 143 | { ". " * write$ } 144 | { output.state after.block = 145 | { add.period$ write$ 146 | newline$ 147 | "\newblock " write$ 148 | } 149 | { output.state before.all = 150 | 'write$ 151 | { add.period$ " " * write$ } 152 | if$ 153 | } 154 | if$ 155 | mid.sentence 'output.state := 156 | } 157 | if$ 158 | s 159 | } 160 | 161 | % urlbst... 162 | FUNCTION {output.nonnull} 163 | { % Save the thing we've been asked to output 164 | 's := 165 | % If the bracket-state is close.brackets, then add a close-bracket to 166 | % what is currently at the top of the stack, and set bracket.state 167 | % to outside.brackets 168 | bracket.state close.brackets = 169 | { "]" * 170 | outside.brackets 'bracket.state := 171 | } 172 | 'skip$ 173 | if$ 174 | bracket.state outside.brackets = 175 | { % We're outside all brackets -- this is the normal situation. 176 | % Write out what's currently at the top of the stack, using the 177 | % original output.nonnull function. 178 | s 179 | output.nonnull.original 180 | } 181 | { % Still in brackets. Add open-bracket or (continuation) comma, add the 182 | % new text (in s) to the top of the stack, and move to the close-brackets 183 | % state, ready for next time (unless inbrackets resets it). If we come 184 | % into this branch, then output.state is carefully undisturbed. 185 | bracket.state open.brackets = 186 | { " [" * } 187 | { ", " * } % bracket.state will be within.brackets 188 | if$ 189 | s * 190 | close.brackets 'bracket.state := 191 | } 192 | if$ 193 | } 194 | 195 | % Call this function just before adding something which should be presented in 196 | % brackets. bracket.state is handled specially within output.nonnull. 197 | FUNCTION {inbrackets} 198 | { bracket.state close.brackets = 199 | { within.brackets 'bracket.state := } % reset the state: not open nor closed 200 | { open.brackets 'bracket.state := } 201 | if$ 202 | } 203 | 204 | FUNCTION {format.lastchecked} 205 | { lastchecked empty$ 206 | { "" } 207 | { updated empty$ 208 | { inbrackets "cited " lastchecked * } 209 | { inbrackets "updated " updated * "; cited " * lastchecked * } 210 | if$ 211 | } 212 | if$ 213 | } 214 | % ...urlbst to here 215 | 216 | FUNCTION {output} 217 | { duplicate$ empty$ 218 | 'pop$ 219 | 'output.nonnull 220 | if$ 221 | } 222 | 223 | FUNCTION {output.check} 224 | { 't := 225 | duplicate$ empty$ 226 | { pop$ "empty " t * " in " * cite$ * warning$ } 227 | 'output.nonnull 228 | if$ 229 | } 230 | 231 | FUNCTION {fin.entry} 232 | { 233 | bracket.state close.brackets = % urlbst 234 | { "]" * } 235 | 'skip$ 236 | if$ 237 | add.period$ 238 | write$ 239 | newline$ 240 | } 241 | 242 | FUNCTION {new.block} 243 | { output.state before.all = 244 | 'skip$ 245 | { after.block 'output.state := } 246 | if$ 247 | } 248 | 249 | FUNCTION {new.sentence} 250 | { output.state after.block = 251 | 'skip$ 252 | { output.state before.all = 253 | 'skip$ 254 | { after.sentence 'output.state := } 255 | if$ 256 | } 257 | if$ 258 | } 259 | 260 | FUNCTION {add.blank} 261 | { " " * before.all 'output.state := 262 | } 263 | 264 | FUNCTION {no.blank.or.punct} 265 | { "" * before.all 'output.state := 266 | } 267 | 268 | FUNCTION {add.semicolon} 269 | { 270 | ";" * 271 | no.blank.or.punct 272 | } 273 | 274 | FUNCTION {date.block} 275 | { 276 | "." * 277 | no.blank.or.punct 278 | } 279 | 280 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 281 | % LOGICAL `NOT', `AND', AND `OR' % 282 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 283 | 284 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 285 | % Logical 'not': 286 | % If the first element on the stack is A then this function 287 | % does the following: 288 | % push { #0 } 289 | % push { #1 } 290 | % So now the first 3 elements of the stack are 291 | % { #1 } { #0 } A 292 | % The first 3 are popped and subjected to 'if': 293 | % If A > 0 then { #0 } is executed, else { #1 } is executed: 294 | % if A > 0 295 | % then 0 296 | % else 1 297 | % So consider integers as logicals, where 1 = true and 0 = false, 298 | % then this does 299 | % (if A then false else true) 300 | % which is a logical 'not'. 301 | 302 | FUNCTION {not} 303 | { { #0 } 304 | { #1 } 305 | if$ 306 | } 307 | 308 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 309 | % Logical 'and': 310 | % If the first 2 elements on the stack are A B 311 | % then this function does the following: 312 | % push 'skip$ 313 | % push { pop$ #0 } 314 | % So now first 4 elements are 315 | % { pop$ #0 } 'skip$ A B 316 | % The first 3 are popped and subjected to 'if' (B is on top of 317 | % the stack): 318 | % If A > 0 then 'skip$ is executed, else { pop$ #0 } is executed: 319 | % if A > 0 320 | % then (B stays on top of stack) 321 | % else (B is popped and #0 is pushed) 322 | % So consider integers as logicals, where 1 = true and 0 = false, 323 | % then this does 324 | % (if A then B else false) 325 | % which is a logical 'and'. 326 | 327 | FUNCTION {and} 328 | { 'skip$ 329 | { pop$ #0 } 330 | if$ 331 | } 332 | 333 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 334 | % Logical 'or': 335 | % If the first 2 elements on the stack are A B 336 | % then this function does the following: 337 | % push { pop$ #1 } 338 | % push 'skip$ 339 | % So now first 4 elements are 340 | % 'skip$ { pop$ #1 } A B 341 | % The first 3 are popped and subjected to 'if' (B is on top of 342 | % the stack): 343 | % If A > 0 then { pop$ #1 } is executed, else 'skip$ is executed: 344 | % if A > 0 345 | % then (B is popped and #1 is pushed) 346 | % else (B stays on top of stack) 347 | % So consider integers as logicals, where 1 = true and 0 = false, 348 | % then this does 349 | % (if A then true else B) 350 | % which is a logical 'or'. 351 | 352 | FUNCTION {or} 353 | { { pop$ #1 } 354 | 'skip$ 355 | if$ 356 | } 357 | 358 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 359 | % GENERAL PURPOSE FUNCTIONS FOR FORMATTING % 360 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 361 | 362 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 363 | % issues warning if field is empty 364 | % call with 365 | % "field" field warning.if.empty 366 | % Note that the first field must be between quotes 367 | % because it is the fieldname for use in the warning message. 368 | % 369 | 370 | FUNCTION {warning.if.empty} 371 | { empty$ 372 | { "No " swap$ * " in " * cite$ * warning$ } 373 | { pop$ } 374 | if$ 375 | } 376 | 377 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 378 | % 379 | % encloses string in pre- and postfix string 380 | % call with 381 | % prefix postfix S enclose.check 382 | % delivers empty string if S empty 383 | % 384 | FUNCTION {enclose.check} 385 | { duplicate$ empty$ 386 | { pop$ pop$ pop$ 387 | "" 388 | } 389 | { swap$ * * } 390 | if$ 391 | } 392 | 393 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 394 | % 395 | % emphasizes top of stack 396 | % call with 397 | % string" emphasize.check 398 | % 399 | 400 | FUNCTION {emphasize.check} 401 | { "\Bem{" swap$ 402 | "}" swap$ 403 | enclose.check 404 | } 405 | 406 | 407 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 408 | % 409 | % brackets top of stack 410 | % call with 411 | % "string" bracket.check 412 | % 413 | FUNCTION {bracket.check} 414 | { "[" swap$ 415 | "]" swap$ 416 | enclose.check 417 | } 418 | 419 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 420 | % 421 | % parenthesizes top of stack 422 | % call with 423 | % "string" parenthesize 424 | % 425 | FUNCTION {parenthesize.check} 426 | { "(" swap$ 427 | ")" swap$ 428 | enclose.check 429 | } 430 | 431 | STRINGS {z} 432 | 433 | FUNCTION {remove.dots} 434 | { 'z := % expects string on top of the stack, pops the string and assigns it to variable z 435 | "" % push empty string 436 | { z empty$ not } % returns 0 if variable z is empty 437 | { z #1 #1 substring$ % push the first character of variable z 438 | z #2 global.max$ substring$ 'z := % assigns the 2nd to last character of variable z to variable z 439 | duplicate$ "\" = % pushes 1 if the last character is "\", otherwise 0 440 | { * % concatenates the last 2 literals 441 | z #1 #1 substring$ % push the first character of variable z 442 | z #2 global.max$ substring$ 'z := % assigns the 2nd to last character of variable z to variable z 443 | * % concatenates the last 2 literals, i.e. every character, even a dot, following a "\" will be printed 444 | } 445 | { duplicate$ "." = % pushes 1 if the last character is ".", otherwise 0 446 | 'pop$ % pushes the pop$ function 447 | { * } % concatenates the last 2 literals 448 | if$ % pops the last character if it is a dot, otherwise concatenates it with the string on top of the stack 449 | } 450 | if$ 451 | } 452 | while$ 453 | } 454 | 455 | INTEGERS {l} 456 | FUNCTION{string.length} 457 | { 458 | #1 'l := 459 | { duplicate$ duplicate$ #1 l substring$ = not } 460 | { l #1 + 'l := } 461 | while$ 462 | pop$ l 463 | } 464 | 465 | STRINGS {replace find text} 466 | INTEGERS {find_length} 467 | FUNCTION {find.replace} 468 | { 469 | 'replace := 470 | 'find := 471 | 'text := 472 | find string.length 'find_length := 473 | "" 474 | { text empty$ not } 475 | { text #1 find_length substring$ find = 476 | { 477 | replace * 478 | text #1 find_length + global.max$ substring$ 'text := 479 | } 480 | { text #1 #1 substring$ * 481 | text #2 global.max$ substring$ 'text := 482 | } 483 | if$ 484 | } 485 | while$ 486 | } 487 | 488 | FUNCTION {new.block.checka} 489 | { empty$ 490 | 'skip$ 491 | 'new.block 492 | if$ 493 | } 494 | 495 | FUNCTION {new.block.checkb} 496 | { empty$ 497 | swap$ empty$ 498 | and 499 | 'skip$ 500 | 'new.block 501 | if$ 502 | } 503 | 504 | FUNCTION {new.sentence.checka} 505 | { empty$ 506 | 'skip$ 507 | 'new.sentence 508 | if$ 509 | } 510 | 511 | FUNCTION {new.sentence.checkb} 512 | { empty$ 513 | swap$ empty$ 514 | and 515 | 'skip$ 516 | 'new.sentence 517 | if$ 518 | } 519 | 520 | FUNCTION {field.or.null} 521 | { duplicate$ empty$ 522 | { pop$ "" } 523 | 'skip$ 524 | if$ 525 | } 526 | 527 | FUNCTION {emphasize} 528 | { skip$ } 529 | 530 | FUNCTION {tie.or.space.prefix} 531 | { duplicate$ text.length$ #3 < 532 | { "~" } 533 | { " " } 534 | if$ 535 | swap$ 536 | } 537 | 538 | FUNCTION {capitalize} 539 | { "u" change.case$ "t" change.case$ } 540 | 541 | FUNCTION {space.word} 542 | { " " swap$ * " " * } 543 | 544 | % Here are the language-specific definitions for explicit words. 545 | % Each function has a name bbl.xxx where xxx is the English word. 546 | % The language selected here is ENGLISH 547 | 548 | FUNCTION {bbl.and} 549 | { "and"} 550 | 551 | FUNCTION {bbl.etal} 552 | { "et~al." } 553 | 554 | FUNCTION {bbl.editors} 555 | { "editors" } 556 | 557 | FUNCTION {bbl.editor} 558 | { "editor" } 559 | 560 | FUNCTION {bbl.cartographers} 561 | { "cartographers" } 562 | 563 | FUNCTION {bbl.cartographer} 564 | { "cartographer" } 565 | 566 | FUNCTION {bbl.inventors} 567 | { "inventors" } 568 | 569 | FUNCTION {bbl.inventor} 570 | { "inventor" } 571 | 572 | FUNCTION {bbl.assignees} 573 | { "assignees" } 574 | 575 | FUNCTION {bbl.assignee} 576 | { "assignee" } 577 | 578 | FUNCTION {bbl.edby} 579 | { "edited by" } 580 | 581 | FUNCTION {bbl.edition} 582 | { "ed." } 583 | 584 | FUNCTION {bbl.volume} 585 | { "vol." } 586 | 587 | FUNCTION {bbl.of} 588 | { "of" } 589 | 590 | FUNCTION {bbl.number} 591 | { "no." } 592 | 593 | FUNCTION {bbl.nr} 594 | { "no." } 595 | 596 | FUNCTION {bbl.in} 597 | { "in" } 598 | 599 | FUNCTION {bbl.pages} 600 | { "p." } 601 | 602 | FUNCTION {bbl.page} 603 | { "p." } 604 | 605 | FUNCTION {bbl.chapter} 606 | { "chap." } 607 | 608 | FUNCTION {bbl.techrep} 609 | { "Tech. Rep." } 610 | 611 | FUNCTION {bbl.mthesis} 612 | { "Master's thesis" } 613 | 614 | FUNCTION {bbl.phdthesis} 615 | { "Ph.D. thesis" } 616 | 617 | FUNCTION {bbl.first} 618 | { "1st" } 619 | 620 | FUNCTION {bbl.second} 621 | { "2nd" } 622 | 623 | FUNCTION {bbl.third} 624 | { "3rd" } 625 | 626 | FUNCTION {bbl.fourth} 627 | { "4th" } 628 | 629 | FUNCTION {bbl.fifth} 630 | { "5th" } 631 | 632 | FUNCTION {bbl.st} 633 | { "st" } 634 | 635 | FUNCTION {bbl.nd} 636 | { "nd" } 637 | 638 | FUNCTION {bbl.rd} 639 | { "rd" } 640 | 641 | FUNCTION {bbl.th} 642 | { "th" } 643 | 644 | MACRO {jan} {"Jan."} 645 | 646 | MACRO {feb} {"Feb."} 647 | 648 | MACRO {mar} {"Mar."} 649 | 650 | MACRO {apr} {"Apr."} 651 | 652 | MACRO {may} {"May"} 653 | 654 | MACRO {jun} {"Jun."} 655 | 656 | MACRO {jul} {"Jul."} 657 | 658 | MACRO {aug} {"Aug."} 659 | 660 | MACRO {sep} {"Sep."} 661 | 662 | MACRO {oct} {"Oct."} 663 | 664 | MACRO {nov} {"Nov."} 665 | 666 | MACRO {dec} {"Dec."} 667 | 668 | FUNCTION {eng.ord} 669 | { duplicate$ "1" swap$ * 670 | #-2 #1 substring$ "1" = 671 | { bbl.th * } 672 | { duplicate$ #-1 #1 substring$ 673 | duplicate$ "1" = 674 | { pop$ bbl.st * } 675 | { duplicate$ "2" = 676 | { pop$ bbl.nd * } 677 | { "3" = 678 | { bbl.rd * } 679 | { bbl.th * } 680 | if$ 681 | } 682 | if$ 683 | } 684 | if$ 685 | } 686 | if$ 687 | } 688 | 689 | FUNCTION {bibinfo.check} 690 | { swap$ 691 | duplicate$ missing$ 692 | { 693 | pop$ pop$ 694 | "" 695 | } 696 | { duplicate$ empty$ 697 | { 698 | swap$ pop$ 699 | } 700 | { swap$ 701 | pop$ 702 | } 703 | if$ 704 | } 705 | if$ 706 | } 707 | 708 | FUNCTION {bibinfo.warn} 709 | { swap$ 710 | duplicate$ missing$ 711 | { 712 | swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ 713 | "" 714 | } 715 | { duplicate$ empty$ 716 | { 717 | swap$ "empty " swap$ * " in " * cite$ * warning$ 718 | } 719 | { swap$ 720 | pop$ 721 | } 722 | if$ 723 | } 724 | if$ 725 | } 726 | 727 | STRINGS { bibinfo} 728 | INTEGERS { nameptr namesleft numnames } 729 | 730 | FUNCTION {format.names} 731 | { 'bibinfo := 732 | duplicate$ empty$ 'skip$ { 733 | "." ". " find.replace 's := 734 | "" 't := 735 | #1 'nameptr := 736 | s num.names$ 'numnames := 737 | numnames 'namesleft := 738 | { namesleft #0 > } 739 | { s nameptr 740 | "{vv~}{ll}{ f{}}{ jj}" 741 | format.name$ 742 | remove.dots 743 | bibinfo bibinfo.check 744 | 't := 745 | nameptr #1 > 746 | { 747 | nameptr #6 748 | #1 + = 749 | numnames #6 750 | > and 751 | { "others" 't := 752 | #1 'namesleft := } 753 | 'skip$ 754 | if$ 755 | namesleft #1 > 756 | { ", " * t * } 757 | { 758 | "," * 759 | s nameptr "{ll}" format.name$ duplicate$ "others" = 760 | { 't := } 761 | { pop$ } 762 | if$ 763 | t "others" = 764 | { 765 | " " * bbl.etal * 766 | } 767 | { " " * t * } 768 | if$ 769 | } 770 | if$ 771 | } 772 | 't 773 | if$ 774 | nameptr #1 + 'nameptr := 775 | namesleft #1 - 'namesleft := 776 | } 777 | while$ 778 | } if$ 779 | } 780 | 781 | FUNCTION {format.names.org} 782 | { 'bibinfo := 783 | duplicate$ empty$ 'skip$ { 784 | 's := 785 | "" 't := 786 | #1 'nameptr := 787 | s num.names$ 'numnames := 788 | numnames 'namesleft := 789 | { namesleft #0 > } 790 | { s nameptr 791 | "{ff~}{vv~}{ll}" 792 | format.name$ 793 | bibinfo bibinfo.check 794 | 't := 795 | nameptr #1 > 796 | { 797 | namesleft #1 > 798 | { "; " * t * } 799 | { 800 | ";" * 801 | s nameptr "{ll}" format.name$ duplicate$ "others" = 802 | { 't := } 803 | { pop$ } 804 | if$ 805 | t "others" = 806 | { 807 | " " * bbl.etal * 808 | } 809 | { " " * t * } 810 | if$ 811 | } 812 | if$ 813 | } 814 | 't 815 | if$ 816 | nameptr #1 + 'nameptr := 817 | namesleft #1 - 'namesleft := 818 | } 819 | while$ 820 | } if$ 821 | } 822 | 823 | FUNCTION {format.names.ed} 824 | { 825 | format.names 826 | } 827 | 828 | FUNCTION {format.authors} 829 | { 830 | author "author" format.names 831 | %%"." " " "author" find.replace format.names 832 | } 833 | 834 | FUNCTION {format.organizations} 835 | { organization "organization" format.names.org 836 | } 837 | 838 | FUNCTION {get.bbl.editor} 839 | { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } 840 | 841 | FUNCTION {get.bbl.cartographer} 842 | { cartographer num.names$ #1 > 'bbl.cartographers 'bbl.cartographer if$ } 843 | 844 | FUNCTION {get.bbl.inventor} 845 | { inventor num.names$ #1 > 'bbl.inventors 'bbl.inventor if$ } 846 | 847 | FUNCTION {get.bbl.assignee} 848 | { assignee num.names$ #1 > 'bbl.assignees 'bbl.assignee if$ } 849 | 850 | FUNCTION {format.editors} 851 | { editor "editor" format.names duplicate$ empty$ 'skip$ 852 | { 853 | "," * 854 | " " * 855 | get.bbl.editor 856 | * 857 | } 858 | if$ 859 | } 860 | 861 | FUNCTION {format.assignees} 862 | { assignee "assignee" format.names.org duplicate$ empty$ 'skip$ 863 | { 864 | "," * 865 | " " * 866 | get.bbl.assignee 867 | * 868 | } 869 | if$ 870 | } 871 | 872 | FUNCTION {format.cartographers} 873 | { cartographer "cartographer" format.names duplicate$ empty$ 'skip$ 874 | { 875 | "," * 876 | " " * 877 | get.bbl.cartographer 878 | * 879 | } 880 | if$ 881 | } 882 | 883 | FUNCTION {format.inventors} 884 | { inventor "inventor" format.names duplicate$ empty$ 'skip$ 885 | { 886 | "," * 887 | " " * 888 | get.bbl.inventor 889 | * 890 | } 891 | if$ 892 | } 893 | 894 | FUNCTION {format.note} 895 | { 896 | note empty$ 897 | { "" } 898 | { note #1 #1 substring$ 899 | duplicate$ "{" = 900 | 'skip$ 901 | { output.state mid.sentence = 902 | { "l" } 903 | { "u" } 904 | if$ 905 | change.case$ 906 | } 907 | if$ 908 | note #2 global.max$ substring$ * "note" bibinfo.check 909 | } 910 | if$ 911 | } 912 | 913 | FUNCTION {format.title} 914 | { title 915 | %%duplicate$ empty$ 'skip$ 916 | %% { "t" change.case$ } 917 | %%if$ 918 | "title" bibinfo.check 919 | } 920 | 921 | FUNCTION {format.type} 922 | { type empty$ 923 | 'skip$ 924 | { inbrackets type } 925 | %%{ add.blank "[" type * "]" * } 926 | if$ 927 | } 928 | 929 | FUNCTION {output.bibitem} 930 | { outside.brackets 'bracket.state := % urlbst 931 | newline$ 932 | "\bibitem{" write$ 933 | cite$ write$ 934 | "}" write$ 935 | newline$ 936 | "" 937 | before.all 'output.state := 938 | } 939 | 940 | FUNCTION {n.dashify} 941 | { 942 | 't := 943 | "" 944 | { t empty$ not } 945 | { t #1 #1 substring$ "-" = 946 | { t #1 #2 substring$ "--" = not 947 | { "--" * 948 | t #2 global.max$ substring$ 't := 949 | } 950 | { { t #1 #1 substring$ "-" = } 951 | { "-" * 952 | t #2 global.max$ substring$ 't := 953 | } 954 | while$ 955 | } 956 | if$ 957 | } 958 | { t #1 #1 substring$ * 959 | t #2 global.max$ substring$ 't := 960 | } 961 | if$ 962 | } 963 | while$ 964 | } 965 | 966 | FUNCTION {word.in} 967 | { bbl.in capitalize 968 | ":" * 969 | " " * } 970 | 971 | FUNCTION {format.journal.date} 972 | { 973 | month "month" bibinfo.check 974 | duplicate$ empty$ 975 | year "year" bibinfo.check duplicate$ empty$ 976 | { 977 | swap$ 'skip$ 978 | { "there's a month but no year in " cite$ * warning$ } 979 | if$ 980 | * 981 | } 982 | { swap$ 'skip$ 983 | { 984 | " " * swap$ 985 | } 986 | if$ 987 | * 988 | remove.dots 989 | } 990 | if$ 991 | duplicate$ empty$ 992 | 'skip$ 993 | { 994 | before.all 'output.state := 995 | after.sentence 'output.state := 996 | } 997 | if$ 998 | } 999 | 1000 | FUNCTION {format.date} 1001 | { 1002 | no.blank.or.punct 1003 | ";" 1004 | duplicate$ empty$ 1005 | year "year" bibinfo.check duplicate$ empty$ 1006 | { swap$ 'skip$ 1007 | { "there's a month but no year in " cite$ * warning$ } 1008 | if$ 1009 | * 1010 | } 1011 | { swap$ 'skip$ 1012 | { 1013 | swap$ 1014 | " " * swap$ 1015 | } 1016 | if$ 1017 | * 1018 | } 1019 | if$ 1020 | } 1021 | 1022 | FUNCTION {format.btitle} 1023 | { title "title" bibinfo.check 1024 | duplicate$ empty$ 'skip$ 1025 | { 1026 | } 1027 | if$ 1028 | } 1029 | 1030 | FUNCTION {either.or.check} 1031 | { empty$ 1032 | 'pop$ 1033 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 1034 | if$ 1035 | } 1036 | 1037 | FUNCTION {format.bvolume} 1038 | { volume empty$ 1039 | { "" } 1040 | { bbl.volume volume tie.or.space.prefix 1041 | "volume" bibinfo.check * * 1042 | series "series" bibinfo.check 1043 | duplicate$ empty$ 'pop$ 1044 | { swap$ bbl.of space.word * swap$ 1045 | emphasize * } 1046 | if$ 1047 | "volume and number" number either.or.check 1048 | } 1049 | if$ 1050 | } 1051 | 1052 | FUNCTION {format.number.series} 1053 | { volume empty$ 1054 | { number empty$ 1055 | { series field.or.null } 1056 | { series empty$ 1057 | { number "number" bibinfo.check } 1058 | { output.state mid.sentence = 1059 | { bbl.number } 1060 | { bbl.number capitalize } 1061 | if$ 1062 | number tie.or.space.prefix "number" bibinfo.check * * 1063 | bbl.in space.word * 1064 | series "series" bibinfo.check * 1065 | } 1066 | if$ 1067 | } 1068 | if$ 1069 | } 1070 | { "" } 1071 | if$ 1072 | } 1073 | 1074 | FUNCTION {is.num} 1075 | { chr.to.int$ 1076 | duplicate$ "0" chr.to.int$ < not 1077 | swap$ "9" chr.to.int$ > not and 1078 | } 1079 | 1080 | FUNCTION {extract.num} 1081 | { duplicate$ 't := 1082 | "" 's := 1083 | { t empty$ not } 1084 | { t #1 #1 substring$ 1085 | t #2 global.max$ substring$ 't := 1086 | duplicate$ is.num 1087 | { s swap$ * 's := } 1088 | { pop$ "" 't := } 1089 | if$ 1090 | } 1091 | while$ 1092 | s empty$ 1093 | 'skip$ 1094 | { pop$ s } 1095 | if$ 1096 | } 1097 | 1098 | FUNCTION {convert.edition} 1099 | { extract.num "l" change.case$ 's := 1100 | s "first" = s "1" = or 1101 | { bbl.first 't := } 1102 | { s "second" = s "2" = or 1103 | { bbl.second 't := } 1104 | { s "third" = s "3" = or 1105 | { bbl.third 't := } 1106 | { s "fourth" = s "4" = or 1107 | { bbl.fourth 't := } 1108 | { s "fifth" = s "5" = or 1109 | { bbl.fifth 't := } 1110 | { s #1 #1 substring$ is.num 1111 | { s eng.ord 't := } 1112 | { edition 't := } 1113 | if$ 1114 | } 1115 | if$ 1116 | } 1117 | if$ 1118 | } 1119 | if$ 1120 | } 1121 | if$ 1122 | } 1123 | if$ 1124 | t 1125 | } 1126 | 1127 | FUNCTION {format.edition} 1128 | { edition duplicate$ empty$ 'skip$ 1129 | { 1130 | convert.edition 1131 | output.state mid.sentence = 1132 | { "l" } 1133 | { "t" } 1134 | if$ change.case$ 1135 | "edition" bibinfo.check 1136 | " " * bbl.edition * 1137 | } 1138 | if$ 1139 | } 1140 | INTEGERS { multiresult } 1141 | FUNCTION {multi.page.check} 1142 | { 't := 1143 | #0 'multiresult := 1144 | { multiresult not 1145 | t empty$ not 1146 | and 1147 | } 1148 | { t #1 #1 substring$ 1149 | duplicate$ "-" = 1150 | swap$ duplicate$ "," = 1151 | swap$ "+" = 1152 | or or 1153 | { #1 'multiresult := } 1154 | { t #2 global.max$ substring$ 't := } 1155 | if$ 1156 | } 1157 | while$ 1158 | multiresult 1159 | } 1160 | 1161 | FUNCTION {format.pages} 1162 | { pages duplicate$ empty$ 'skip$ 1163 | { duplicate$ multi.page.check 1164 | { 1165 | bbl.pages swap$ 1166 | n.dashify 1167 | } 1168 | { 1169 | bbl.page swap$ 1170 | } 1171 | if$ 1172 | tie.or.space.prefix 1173 | "pages" bibinfo.check 1174 | * * 1175 | } 1176 | if$ 1177 | } 1178 | 1179 | FUNCTION {format.journal.pages} 1180 | { pages duplicate$ empty$ 'pop$ 1181 | { swap$ duplicate$ empty$ 1182 | { pop$ pop$ format.pages } 1183 | { 1184 | ":" * 1185 | swap$ 1186 | n.dashify 1187 | "pages" bibinfo.check 1188 | * 1189 | } 1190 | if$ 1191 | } 1192 | if$ 1193 | } 1194 | 1195 | FUNCTION {format.vol.num} 1196 | { volume field.or.null 1197 | duplicate$ empty$ 'skip$ 1198 | { 1199 | "volume" bibinfo.check 1200 | } 1201 | if$ 1202 | number "number" bibinfo.check duplicate$ empty$ 'skip$ 1203 | { 1204 | swap$ duplicate$ empty$ 1205 | { "there's a number but no volume in " cite$ * warning$ } 1206 | 'skip$ 1207 | if$ 1208 | swap$ 1209 | "(" swap$ * ")" * 1210 | } 1211 | if$ * 1212 | } 1213 | 1214 | FUNCTION {format.vol.num.pages} 1215 | { volume field.or.null 1216 | duplicate$ empty$ 'skip$ 1217 | { 1218 | "volume" bibinfo.check 1219 | } 1220 | if$ 1221 | number "number" bibinfo.check duplicate$ empty$ 'skip$ 1222 | { 1223 | swap$ duplicate$ empty$ 1224 | { "there's a number but no volume in " cite$ * warning$ } 1225 | 'skip$ 1226 | if$ 1227 | swap$ 1228 | "(" swap$ * ")" * 1229 | } 1230 | if$ * 1231 | format.journal.pages 1232 | } 1233 | 1234 | FUNCTION {format.chapter.pages} 1235 | { chapter empty$ 1236 | 'format.pages 1237 | { type empty$ 1238 | { bbl.chapter } 1239 | { type "l" change.case$ 1240 | "type" bibinfo.check 1241 | } 1242 | if$ 1243 | chapter tie.or.space.prefix 1244 | "chapter" bibinfo.check 1245 | * * 1246 | pages empty$ 1247 | 'skip$ 1248 | { ", " * format.pages * } 1249 | if$ 1250 | } 1251 | if$ 1252 | } 1253 | 1254 | FUNCTION {format.booktitle} 1255 | { 1256 | booktitle "booktitle" bibinfo.check 1257 | } 1258 | 1259 | FUNCTION {format.in.ed.booktitle} 1260 | { format.booktitle duplicate$ empty$ 'skip$ 1261 | { 1262 | editor "editor" format.names.ed duplicate$ empty$ 'pop$ 1263 | { 1264 | "," * 1265 | " " * 1266 | get.bbl.editor 1267 | ". " * 1268 | * swap$ 1269 | * } 1270 | if$ 1271 | word.in swap$ * 1272 | } 1273 | if$ 1274 | } 1275 | 1276 | FUNCTION {format.in.ed.title} 1277 | { format.title duplicate$ empty$ 'skip$ 1278 | { 1279 | editor "editor" format.names.ed duplicate$ empty$ 'pop$ 1280 | { 1281 | "," * 1282 | " " * 1283 | get.bbl.editor 1284 | ". " * 1285 | * swap$ 1286 | * } 1287 | if$ 1288 | word.in swap$ * 1289 | } 1290 | if$ 1291 | } 1292 | 1293 | FUNCTION {empty.misc.check} 1294 | { author empty$ title empty$ howpublished empty$ 1295 | month empty$ year empty$ note empty$ 1296 | and and and and and 1297 | { "all relevant fields are empty in " cite$ * warning$ } 1298 | 'skip$ 1299 | if$ 1300 | } 1301 | FUNCTION {format.thesis.type} 1302 | { type duplicate$ empty$ 1303 | 'pop$ 1304 | { swap$ pop$ 1305 | "t" change.case$ "type" bibinfo.check 1306 | } 1307 | if$ 1308 | } 1309 | FUNCTION {format.tr.number} 1310 | { 1311 | number "number" bibinfo.check 1312 | %%type duplicate$ empty$ 1313 | %%{ pop$ bbl.techrep } 1314 | %%'skip$ 1315 | %%if$ 1316 | %%"type" bibinfo.check 1317 | %%swap$ duplicate$ empty$ 1318 | %%{ pop$ "t" change.case$ } 1319 | %%{ tie.or.space.prefix * * } 1320 | %%if$ 1321 | } 1322 | 1323 | FUNCTION {format.org.or.pub} 1324 | { 't := 1325 | "" 1326 | address empty$ t empty$ and 1327 | 'skip$ 1328 | { 1329 | address "address" bibinfo.check * 1330 | t empty$ 1331 | 'skip$ 1332 | { address empty$ 1333 | 'skip$ 1334 | { ": " * } 1335 | if$ 1336 | t * 1337 | } 1338 | if$ 1339 | } 1340 | if$ 1341 | } 1342 | 1343 | FUNCTION {format.publisher.address} 1344 | { publisher "publisher" bibinfo.warn format.org.or.pub 1345 | } 1346 | 1347 | FUNCTION {format.organization.address} 1348 | { organization "organization" bibinfo.check format.org.or.pub 1349 | } 1350 | 1351 | FUNCTION {format.institution.address} 1352 | { institution "institution" bibinfo.check format.org.or.pub 1353 | } 1354 | 1355 | 1356 | % urlbst... 1357 | % Functions for making hypertext links. 1358 | % In all cases, the stack has (link-text href-url) 1359 | % 1360 | % make 'null' specials 1361 | FUNCTION {make.href.null} 1362 | { 1363 | pop$ 1364 | } 1365 | % make hypertex specials 1366 | FUNCTION {make.href.hypertex} 1367 | { 1368 | "\special {html: }" * swap$ * 1370 | "\special {html:}" * 1371 | } 1372 | % make hyperref specials 1373 | FUNCTION {make.href.hyperref} 1374 | { 1375 | "\href {" swap$ * "} {" * swap$ * "}" * 1376 | } 1377 | FUNCTION {make.href} 1378 | { hrefform #2 = 1379 | 'make.href.hyperref % hrefform = 2 1380 | { hrefform #1 = 1381 | 'make.href.hypertex % hrefform = 1 1382 | 'make.href.null % hrefform = 0 (or anything else) 1383 | if$ 1384 | } 1385 | if$ 1386 | } 1387 | 1388 | FUNCTION {format.url} 1389 | { url empty$ 1390 | { "" } 1391 | { hrefform #1 = 1392 | { % special case -- add HyperTeX specials 1393 | urlintro "\url{" url * "}" * url make.href.hypertex * } 1394 | { urlintro "\url{" * url * "}" * } 1395 | if$ 1396 | } 1397 | if$ 1398 | } 1399 | 1400 | FUNCTION {format.eprint} 1401 | { eprint empty$ 1402 | { "" } 1403 | { eprintprefix eprint * eprinturl eprint * make.href } 1404 | if$ 1405 | } 1406 | 1407 | FUNCTION {format.doi} 1408 | { doi empty$ 1409 | { "" } 1410 | { doiprefix doi * doiurl doi * make.href } 1411 | if$ 1412 | } 1413 | 1414 | % Output a URL. We can't use the more normal idiom (something like 1415 | % `format.url output'), because the `inbrackets' within 1416 | % format.lastchecked applies to everything between calls to `output', 1417 | % so that `format.url format.lastchecked * output' ends up with both 1418 | % the URL and the lastchecked in brackets. 1419 | FUNCTION {output.url} 1420 | { url empty$ 1421 | 'skip$ 1422 | { new.block 1423 | format.url output 1424 | format.lastchecked output 1425 | } 1426 | if$ 1427 | } 1428 | 1429 | FUNCTION {output.web.refs} 1430 | { 1431 | new.block 1432 | output.url 1433 | addeprints eprint empty$ not and 1434 | { format.eprint output.nonnull } 1435 | 'skip$ 1436 | if$ 1437 | adddoiresolver doi empty$ not and 1438 | { format.doi output.nonnull } 1439 | 'skip$ 1440 | if$ 1441 | % addeprints 1442 | % { eprint empty$ 1443 | % 'skip$ 1444 | % { format.eprint output.nonnull } 1445 | % if$ 1446 | % } 1447 | % 'skip$ 1448 | % if$ 1449 | } 1450 | 1451 | % Webpage entry type. 1452 | % Title and url fields required; 1453 | % author, note, year, month, and lastchecked fields optional 1454 | STRINGS {database} 1455 | FUNCTION {webpage} 1456 | { output.bibitem 1457 | author empty$ 1458 | { editor empty$ 1459 | 'skip$ % author and editor both optional 1460 | { format.editors output.nonnull } 1461 | if$ 1462 | } 1463 | { editor empty$ 1464 | { format.authors output.nonnull } 1465 | { "can't use both author and editor fields in " cite$ * warning$ } 1466 | if$ 1467 | } 1468 | if$ 1469 | % author empty$ 1470 | % 'skip$ 1471 | % { format.authors output.nonnull } 1472 | % if$ 1473 | new.block 1474 | format.title "title" output.check 1475 | journal empty$ 1476 | { 1477 | format.type "type" output.check 1478 | publisher empty$ 1479 | 'skip$ 1480 | { format.publisher.address output } 1481 | if$ 1482 | "database on the Internet" 'database := 1483 | type database = 1484 | { format.journal.date "year" output.check } 1485 | { format.date "year" output.check } 1486 | if$ 1487 | lastchecked empty$ 1488 | 'skip$ 1489 | { format.lastchecked output } 1490 | if$ 1491 | new.block 1492 | part empty$ 1493 | 'skip$ 1494 | { part output } 1495 | if$ 1496 | pages empty$ 1497 | 'skip$ 1498 | { pages bracket.check output } 1499 | if$ 1500 | } 1501 | { journal 1502 | remove.dots 1503 | "journal" bibinfo.check 1504 | "journal" output.check 1505 | format.type "type" output.check 1506 | format.journal.date "year" output.check 1507 | lastchecked empty$ 1508 | 'skip$ 1509 | { format.lastchecked output 1510 | ";" no.blank.or.punct output 1511 | } 1512 | if$ 1513 | no.blank.or.punct format.vol.num output 1514 | pages empty$ 1515 | 'skip$ 1516 | { ":" no.blank.or.punct output 1517 | no.blank.or.punct pages bracket.check output 1518 | } 1519 | if$ 1520 | new.block 1521 | } 1522 | if$ 1523 | format.url "url" output.check 1524 | new.block 1525 | note output 1526 | fin.entry 1527 | } 1528 | % ...urlbst to here 1529 | 1530 | FUNCTION {misc} 1531 | { output.bibitem 1532 | format.authors "author" output.check 1533 | format.editors "author and editor" output.check 1534 | format.title "title" output.check 1535 | type missing$ 1536 | { skip$ } 1537 | { format.type "type" output.check } 1538 | %%{ inbrackets type output } 1539 | if$ 1540 | new.block 1541 | format.publisher.address output 1542 | format.date "year" output.check 1543 | new.block 1544 | format.note output 1545 | new.block 1546 | howpublished new.block.checka 1547 | howpublished "howpublished" bibinfo.check output 1548 | output.web.refs % urlbst 1549 | fin.entry 1550 | empty.misc.check 1551 | } 1552 | 1553 | FUNCTION {article} 1554 | { output.bibitem 1555 | format.authors "author" output.check 1556 | organization empty$ 1557 | 'skip$ 1558 | { author empty$ 1559 | { 1560 | format.organizations "organization" output.check 1561 | } 1562 | { 1563 | "; " * 1564 | no.blank.or.punct 1565 | format.organizations "organization" output.check 1566 | } 1567 | if$ 1568 | } 1569 | if$ 1570 | new.block 1571 | format.title "title" output.check 1572 | type missing$ 1573 | { skip$ } 1574 | { format.type "type" output.check } 1575 | if$ 1576 | new.block 1577 | journal 1578 | remove.dots 1579 | "journal" bibinfo.check 1580 | "journal" output.check 1581 | format.journal.date "year" output.check 1582 | add.semicolon 1583 | format.vol.num.pages output 1584 | new.block 1585 | format.note output 1586 | output.web.refs % urlbst 1587 | fin.entry 1588 | } 1589 | 1590 | FUNCTION {book} 1591 | { output.bibitem 1592 | author empty$ 1593 | { editor empty$ 1594 | { format.organizations "organization" output.check } 1595 | { format.editors "author and editor" output.check } 1596 | if$ 1597 | } 1598 | { format.authors output.nonnull 1599 | "author and editor" editor either.or.check 1600 | } 1601 | if$ 1602 | new.block 1603 | format.btitle "title" output.check 1604 | format.bvolume output 1605 | new.block 1606 | format.edition output 1607 | new.sentence 1608 | author empty$ not 1609 | editor empty$ not 1610 | and 1611 | { format.editors "author and editor" output.check } 1612 | 'skip$ 1613 | if$ 1614 | format.number.series output 1615 | format.publisher.address output 1616 | format.date "year" output.check 1617 | new.block 1618 | format.note output 1619 | output.web.refs % urlbst 1620 | fin.entry 1621 | } 1622 | 1623 | FUNCTION {booklet} 1624 | { misc } 1625 | 1626 | FUNCTION {dictionary} 1627 | { output.bibitem 1628 | format.booktitle "booktitle" output.check 1629 | format.bvolume output 1630 | new.block 1631 | format.edition output 1632 | new.sentence 1633 | format.publisher.address output 1634 | format.date "year" output.check 1635 | format.btitle "title" output.check 1636 | add.semicolon 1637 | add.blank 1638 | format.pages "pages" output.check 1639 | new.block 1640 | format.note output 1641 | output.web.refs % urlbst 1642 | fin.entry 1643 | } 1644 | 1645 | FUNCTION {inbook} 1646 | { output.bibitem 1647 | format.authors "author" output.check 1648 | new.block 1649 | chapter "chapter" output.check 1650 | new.block 1651 | format.in.ed.title "title" output.check 1652 | format.bvolume output 1653 | format.edition output 1654 | new.sentence 1655 | format.number.series output 1656 | format.publisher.address output 1657 | format.date "year" output.check 1658 | date.block 1659 | add.blank 1660 | format.pages "pages" output.check 1661 | new.block 1662 | format.note output 1663 | output.web.refs % urlbst 1664 | fin.entry 1665 | } 1666 | 1667 | FUNCTION {incollection} 1668 | { output.bibitem 1669 | format.authors "author" output.check 1670 | new.block 1671 | format.title "title" output.check 1672 | new.block 1673 | format.in.ed.booktitle "booktitle" output.check 1674 | format.bvolume output 1675 | format.edition output 1676 | new.sentence 1677 | format.number.series output 1678 | format.publisher.address output 1679 | format.date "year" output.check 1680 | date.block 1681 | add.blank 1682 | format.pages "pages" output.check 1683 | new.block 1684 | format.note output 1685 | output.web.refs % urlbst 1686 | fin.entry 1687 | } 1688 | 1689 | FUNCTION {inproceedings} 1690 | { output.bibitem 1691 | format.authors "author" output.check 1692 | new.block 1693 | format.title "title" output.check 1694 | new.block 1695 | format.in.ed.booktitle "booktitle" output.check 1696 | format.bvolume output 1697 | new.sentence 1698 | format.number.series output 1699 | publisher empty$ 1700 | { format.organization.address output } 1701 | { organization "organization" bibinfo.check output 1702 | format.publisher.address output 1703 | } 1704 | if$ 1705 | format.date "year" output.check 1706 | date.block 1707 | add.blank 1708 | format.pages "pages" output.check 1709 | new.block 1710 | format.note output 1711 | output.web.refs % urlbst 1712 | fin.entry 1713 | } 1714 | 1715 | FUNCTION {conference} 1716 | {inproceedings} 1717 | 1718 | FUNCTION {manual} 1719 | {misc} 1720 | 1721 | FUNCTION {phdthesis} 1722 | { output.bibitem 1723 | format.authors "author" output.check 1724 | new.block 1725 | format.btitle 1726 | "title" output.check 1727 | format.type "type" output.check 1728 | new.block 1729 | school "school" bibinfo.warn output 1730 | address "address" bibinfo.check output 1731 | format.date "year" output.check 1732 | new.block 1733 | format.note output 1734 | output.web.refs % urlbst 1735 | fin.entry 1736 | } 1737 | 1738 | FUNCTION {mastersthesis} 1739 | {phdthesis} 1740 | 1741 | FUNCTION {proceedings} 1742 | { output.bibitem 1743 | editor empty$ 1744 | { organization "organization" bibinfo.check output 1745 | } 1746 | { format.editors output.nonnull } 1747 | if$ 1748 | new.block 1749 | format.btitle "title" output.check 1750 | format.bvolume output 1751 | editor empty$ 1752 | { publisher empty$ 1753 | 'skip$ 1754 | { 1755 | new.sentence 1756 | format.number.series output 1757 | format.publisher.address output 1758 | } 1759 | if$ 1760 | } 1761 | { publisher empty$ 1762 | { 1763 | new.sentence 1764 | format.organization.address output } 1765 | { 1766 | new.sentence 1767 | organization "organization" bibinfo.check output 1768 | format.publisher.address output 1769 | } 1770 | if$ 1771 | } 1772 | if$ 1773 | format.date "year" output.check 1774 | new.block 1775 | format.note output 1776 | output.web.refs % urlbst 1777 | fin.entry 1778 | } 1779 | 1780 | FUNCTION {techreport} 1781 | { output.bibitem 1782 | format.authors "author" output.check 1783 | new.block 1784 | format.title 1785 | "title" output.check 1786 | new.block 1787 | format.institution.address output 1788 | format.date "year" output.check 1789 | format.tr.number output.nonnull 1790 | new.block 1791 | format.note output 1792 | output.web.refs % urlbst 1793 | fin.entry 1794 | } 1795 | 1796 | FUNCTION {map} 1797 | { output.bibitem 1798 | format.cartographers "cartographer" output.check 1799 | new.block 1800 | format.title 1801 | "title" output.check 1802 | format.type "type" output.check 1803 | new.block 1804 | format.publisher.address output 1805 | format.date "year" output.check 1806 | new.block 1807 | format.note output 1808 | output.web.refs % urlbst 1809 | fin.entry 1810 | } 1811 | 1812 | FUNCTION {patent} 1813 | { output.bibitem 1814 | format.inventors "inventor" output.check 1815 | "; " * 1816 | no.blank.or.punct 1817 | format.assignees "assignee" output.check 1818 | new.block 1819 | format.title 1820 | "title" output.check 1821 | new.block 1822 | format.tr.number output.nonnull 1823 | format.date "year" output.check 1824 | new.block 1825 | format.note output 1826 | output.web.refs % urlbst 1827 | fin.entry 1828 | } 1829 | 1830 | FUNCTION {unpublished} 1831 | { output.bibitem 1832 | format.authors "author" output.check 1833 | new.block 1834 | format.title "title" output.check 1835 | format.date output 1836 | new.block 1837 | format.note "note" output.check 1838 | output.web.refs % urlbst 1839 | fin.entry 1840 | } 1841 | 1842 | FUNCTION {default.type} { misc } 1843 | READ 1844 | STRINGS { longest.label } 1845 | INTEGERS { number.label longest.label.width } 1846 | FUNCTION {initialize.longest.label} 1847 | { "" 'longest.label := 1848 | #1 'number.label := 1849 | #0 'longest.label.width := 1850 | } 1851 | FUNCTION {longest.label.pass} 1852 | { number.label int.to.str$ 'label := 1853 | number.label #1 + 'number.label := 1854 | label width$ longest.label.width > 1855 | { label 'longest.label := 1856 | label width$ 'longest.label.width := 1857 | } 1858 | 'skip$ 1859 | if$ 1860 | } 1861 | EXECUTE {initialize.longest.label} 1862 | ITERATE {longest.label.pass} 1863 | FUNCTION {begin.bib} 1864 | { preamble$ empty$ 1865 | 'skip$ 1866 | { preamble$ write$ newline$ } 1867 | if$ 1868 | "\begin{thebibliography}{" longest.label * "}" * 1869 | write$ newline$ 1870 | } 1871 | EXECUTE {begin.bib} 1872 | EXECUTE {init.config.constants} 1873 | EXECUTE {init.state.consts} 1874 | ITERATE {call.type$} 1875 | FUNCTION {end.bib} 1876 | { newline$ 1877 | "\end{thebibliography}" write$ newline$ 1878 | } 1879 | EXECUTE {end.bib} 1880 | %% End of customized bst file 1881 | %% 1882 | %% End of file `vancouver.bst'. 1883 | -------------------------------------------------------------------------------- /readers/110722.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/110722.txt -------------------------------------------------------------------------------- /readers/22solveStella.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/22solveStella.txt -------------------------------------------------------------------------------- /readers/AbelSaul.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/AbelSaul.txt -------------------------------------------------------------------------------- /readers/AnneBr.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/AnneBr.txt -------------------------------------------------------------------------------- /readers/Atotenschaedel.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Atotenschaedel.txt -------------------------------------------------------------------------------- /readers/Christinamurphy01.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Christinamurphy01.txt -------------------------------------------------------------------------------- /readers/Chrisu08.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /readers/DCEW.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/DCEW.txt -------------------------------------------------------------------------------- /readers/DerZ115.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/DerZ115.txt -------------------------------------------------------------------------------- /readers/DesmondSmith.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/DesmondSmith.txt -------------------------------------------------------------------------------- /readers/Felydae.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Felydae.txt -------------------------------------------------------------------------------- /readers/Hennebe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Hennebe.txt -------------------------------------------------------------------------------- /readers/Isaac-Woodard.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Isaac-Woodard.txt -------------------------------------------------------------------------------- /readers/IsabellaLiFischer.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/IsabellaLiFischer.txt -------------------------------------------------------------------------------- /readers/IsabellePotterill.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/IsabellePotterill.txt -------------------------------------------------------------------------------- /readers/Izzy-J-R.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Izzy-J-R.txt -------------------------------------------------------------------------------- /readers/JGilheany.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/JGilheany.txt -------------------------------------------------------------------------------- /readers/LeonBat.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/LeonBat.txt -------------------------------------------------------------------------------- /readers/Lodegit.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Lodegit.txt -------------------------------------------------------------------------------- /readers/LordRegibald.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/LordRegibald.txt -------------------------------------------------------------------------------- /readers/LuGri.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/LuGri.txt -------------------------------------------------------------------------------- /readers/MARTINFERREIRO.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/MARTINFERREIRO.txt -------------------------------------------------------------------------------- /readers/MM004.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/MM004.txt -------------------------------------------------------------------------------- /readers/MarcelVanOijen.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/MarcelVanOijen.txt -------------------------------------------------------------------------------- /readers/Melyyyy123.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Melyyyy123.txt -------------------------------------------------------------------------------- /readers/Moderate-PG.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Moderate-PG.txt -------------------------------------------------------------------------------- /readers/Monrilo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Monrilo.txt -------------------------------------------------------------------------------- /readers/Mrt905.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Mrt905.txt -------------------------------------------------------------------------------- /readers/OrangeMati.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/OrangeMati.txt -------------------------------------------------------------------------------- /readers/PSCoding123.txt: -------------------------------------------------------------------------------- 1 | ECHO ist eingeschaltet (ON). 2 | -------------------------------------------------------------------------------- /readers/Parijat1601.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Parijat1601.txt -------------------------------------------------------------------------------- /readers/PhRausch.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/PhRausch.txt -------------------------------------------------------------------------------- /readers/SFAM14.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/SFAM14.txt -------------------------------------------------------------------------------- /readers/SaikollaLab.txt: -------------------------------------------------------------------------------- 1 | SaikollaLab 2 | -------------------------------------------------------------------------------- /readers/SebGritsch.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/SebGritsch.txt -------------------------------------------------------------------------------- /readers/ShirlynXu.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/ShirlynXu.txt -------------------------------------------------------------------------------- /readers/SkyMaden.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/SkyMaden.txt -------------------------------------------------------------------------------- /readers/Sonja117012.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Sonja117012.txt -------------------------------------------------------------------------------- /readers/SophieHampejs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/SophieHampejs.txt -------------------------------------------------------------------------------- /readers/StasiaATP.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/StasiaATP.txt -------------------------------------------------------------------------------- /readers/Verena1992.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Verena1992.txt -------------------------------------------------------------------------------- /readers/Victoria06022002.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/Victoria06022002.txt -------------------------------------------------------------------------------- /readers/WilliamAboucaya.txt: -------------------------------------------------------------------------------- 1 | Thanks for the tutorial :) 2 | -------------------------------------------------------------------------------- /readers/aaaalex5.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/aaaalex5.txt -------------------------------------------------------------------------------- /readers/aamberger.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/aamberger.txt -------------------------------------------------------------------------------- /readers/abbynewbury.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/abbynewbury.txt -------------------------------------------------------------------------------- /readers/acgraf.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/acgraf.txt -------------------------------------------------------------------------------- /readers/adomingues.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/adomingues.txt -------------------------------------------------------------------------------- /readers/alesandrae.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/alesandrae.txt -------------------------------------------------------------------------------- /readers/allysonsny.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/allysonsny.txt -------------------------------------------------------------------------------- /readers/amirfeizi.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/amirfeizi.txt -------------------------------------------------------------------------------- /readers/anarchistic-bacteria.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/anarchistic-bacteria.txt -------------------------------------------------------------------------------- /readers/annagauner.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/annagauner.txt -------------------------------------------------------------------------------- /readers/annamrak.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/annamrak.txt -------------------------------------------------------------------------------- /readers/annazoechner.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/annazoechner.txt -------------------------------------------------------------------------------- /readers/anniew.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/anniew.txt -------------------------------------------------------------------------------- /readers/anpefi.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/anpefi.txt -------------------------------------------------------------------------------- /readers/armin-neuro.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/armin-neuro.txt -------------------------------------------------------------------------------- /readers/avicens.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/avicens.txt -------------------------------------------------------------------------------- /readers/avv5279.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/avv5279.txt -------------------------------------------------------------------------------- /readers/benedict-yuen.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/benedict-yuen.txt -------------------------------------------------------------------------------- /readers/biodatasciencetulln.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/biodatasciencetulln.txt -------------------------------------------------------------------------------- /readers/bpecken.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/bpecken.txt -------------------------------------------------------------------------------- /readers/brianehenyo.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/brianehenyo.txt -------------------------------------------------------------------------------- /readers/bry10187.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /readers/bsophi.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/bsophi.txt -------------------------------------------------------------------------------- /readers/c-mayer.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/c-mayer.txt -------------------------------------------------------------------------------- /readers/cdanielmachado.txt: -------------------------------------------------------------------------------- 1 | Great tutorial, congrats! 2 | -------------------------------------------------------------------------------- /readers/cginer.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/cginer.txt -------------------------------------------------------------------------------- /readers/chrissieboe.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/chrissieboe.txt -------------------------------------------------------------------------------- /readers/cicci726.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/cicci726.txt -------------------------------------------------------------------------------- /readers/daniiiii21.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/daniiiii21.txt -------------------------------------------------------------------------------- /readers/danschw.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/danschw.txt -------------------------------------------------------------------------------- /readers/davetang.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/davetang.txt -------------------------------------------------------------------------------- /readers/david-aceituno.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/david-aceituno.txt -------------------------------------------------------------------------------- /readers/davidlilek.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/davidlilek.txt -------------------------------------------------------------------------------- /readers/denironyx.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/denironyx.txt -------------------------------------------------------------------------------- /readers/domenatz.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/domenatz.txt -------------------------------------------------------------------------------- /readers/ec363.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/ec363.txt -------------------------------------------------------------------------------- /readers/ejj5147.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/ejj5147.txt -------------------------------------------------------------------------------- /readers/erdavenport.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/erdavenport.txt -------------------------------------------------------------------------------- /readers/fhwnmatt.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/fhwnmatt.txt -------------------------------------------------------------------------------- /readers/fmenol.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/fmenol.txt -------------------------------------------------------------------------------- /readers/gschloegel.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/gschloegel.txt -------------------------------------------------------------------------------- /readers/gurukatagi.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/gurukatagi.txt -------------------------------------------------------------------------------- /readers/gvwilson.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/gvwilson.txt -------------------------------------------------------------------------------- /readers/gwangjinkim.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/gwangjinkim.txt -------------------------------------------------------------------------------- /readers/gwiesner.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/gwiesner.txt -------------------------------------------------------------------------------- /readers/heisslaura.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/heisslaura.txt -------------------------------------------------------------------------------- /readers/hronn95.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/hronn95.txt -------------------------------------------------------------------------------- /readers/hufnhuf.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/hufnhuf.txt -------------------------------------------------------------------------------- /readers/isabellapauser.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/isabellapauser.txt -------------------------------------------------------------------------------- /readers/jandolinsek.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/jandolinsek.txt -------------------------------------------------------------------------------- /readers/jbonaffini.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/jbonaffini.txt -------------------------------------------------------------------------------- /readers/jdarias93.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/jdarias93.txt -------------------------------------------------------------------------------- /readers/jdblischak.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/jdblischak.txt -------------------------------------------------------------------------------- /readers/jimdwyer.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/jimdwyer.txt -------------------------------------------------------------------------------- /readers/jjodx.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/jjodx.txt -------------------------------------------------------------------------------- /readers/joelograsso.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/joelograsso.txt -------------------------------------------------------------------------------- /readers/jordanok25.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/jordanok25.txt -------------------------------------------------------------------------------- /readers/joshuar11.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/joshuar11.txt -------------------------------------------------------------------------------- /readers/joslesh.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /readers/jtehand.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/jtehand.txt -------------------------------------------------------------------------------- /readers/kadsae.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/kadsae.txt -------------------------------------------------------------------------------- /readers/kbin94.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/kbin94.txt -------------------------------------------------------------------------------- /readers/kevinpryan.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/kevinpryan.txt -------------------------------------------------------------------------------- /readers/ksw9.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/ksw9.txt -------------------------------------------------------------------------------- /readers/kvcross.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/kvcross.txt -------------------------------------------------------------------------------- /readers/lchunhui.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/lchunhui.txt -------------------------------------------------------------------------------- /readers/louisepb.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/louisepb.txt -------------------------------------------------------------------------------- /readers/macaple.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/macaple.txt -------------------------------------------------------------------------------- /readers/manukill.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/manukill.txt -------------------------------------------------------------------------------- /readers/marcohamins.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/marcohamins.txt -------------------------------------------------------------------------------- /readers/mariorollojr.txt: -------------------------------------------------------------------------------- 1 | Thank you for this learning opportunity -------------------------------------------------------------------------------- /readers/martin2801.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/martin2801.txt -------------------------------------------------------------------------------- /readers/martina8991.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/martina8991.txt -------------------------------------------------------------------------------- /readers/mbogdana.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/mbogdana.txt -------------------------------------------------------------------------------- /readers/michelle-1707.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/michelle-1707.txt -------------------------------------------------------------------------------- /readers/minino-s.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/minino-s.txt -------------------------------------------------------------------------------- /readers/mitrazad.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/mitrazad.txt -------------------------------------------------------------------------------- /readers/nanschko.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/nanschko.txt -------------------------------------------------------------------------------- /readers/nbmanning.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/nbmanning.txt -------------------------------------------------------------------------------- /readers/nigginoki.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/nigginoki.txt -------------------------------------------------------------------------------- /readers/noex69.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/noex69.txt -------------------------------------------------------------------------------- /readers/oasalmon.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/oasalmon.txt -------------------------------------------------------------------------------- /readers/oryoruk.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/oryoruk.txt -------------------------------------------------------------------------------- /readers/philiprn.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/philiprn.txt -------------------------------------------------------------------------------- /readers/pinkysaid.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/pinkysaid.txt -------------------------------------------------------------------------------- /readers/polymerase11.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/polymerase11.txt -------------------------------------------------------------------------------- /readers/quyenvanorden.txt: -------------------------------------------------------------------------------- 1 | Hi! 2 | -------------------------------------------------------------------------------- /readers/rbjorkas.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/rbjorkas.txt -------------------------------------------------------------------------------- /readers/rbrauning.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/rbrauning.txt -------------------------------------------------------------------------------- /readers/rcosentino.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/rcosentino.txt -------------------------------------------------------------------------------- /readers/rdpalacio.txt: -------------------------------------------------------------------------------- 1 | hello world! -------------------------------------------------------------------------------- /readers/rhcaeb.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/rhcaeb.txt -------------------------------------------------------------------------------- /readers/richardhuskey.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/richardhuskey.txt -------------------------------------------------------------------------------- /readers/robschick.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/robschick.txt -------------------------------------------------------------------------------- /readers/roisinks.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/roisinks.txt -------------------------------------------------------------------------------- /readers/rqb5558.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/rqb5558.txt -------------------------------------------------------------------------------- /readers/schneifel.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/schneifel.txt -------------------------------------------------------------------------------- /readers/sehias.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/sehias.txt -------------------------------------------------------------------------------- /readers/sgansb.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/sgansb.txt -------------------------------------------------------------------------------- /readers/simsal35.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/simsal35.txt -------------------------------------------------------------------------------- /readers/slaurie.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/slaurie.txt -------------------------------------------------------------------------------- /readers/sunh20.txt: -------------------------------------------------------------------------------- 1 | Thank you for putting this resource together! 2 | -------------------------------------------------------------------------------- /readers/suvans1366.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/suvans1366.txt -------------------------------------------------------------------------------- /readers/tboulier.txt: -------------------------------------------------------------------------------- 1 | Thanks for this great article! 2 | -------------------------------------------------------------------------------- /readers/thegitrogmonster.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/thegitrogmonster.txt -------------------------------------------------------------------------------- /readers/tinscherl2.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/tinscherl2.txt -------------------------------------------------------------------------------- /readers/tjelvar-olsson.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/tjelvar-olsson.txt -------------------------------------------------------------------------------- /readers/troehrs.txt: -------------------------------------------------------------------------------- 1 | This is a well done introduction to GIT... 2 | Thank you very much :-) 3 | -------------------------------------------------------------------------------- /readers/turtley-awesome-tort.txt: -------------------------------------------------------------------------------- 1 | Hello, I am a turtle. 2 | 3 | 4 | My favorite food: 5 | 6 | salad, 7 | cucumber, 8 | dandelions, 9 | blueberries, 10 | raspberries, 11 | strawberries, 12 | carrots, 13 | 14 | My favorite activities: 15 | eating, 16 | sleeping, 17 | doing nothing -------------------------------------------------------------------------------- /readers/twmccart.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/twmccart.txt -------------------------------------------------------------------------------- /readers/unimichl.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/unimichl.txt -------------------------------------------------------------------------------- /readers/vitorc.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/vitorc.txt -------------------------------------------------------------------------------- /readers/vlr5103.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/vlr5103.txt -------------------------------------------------------------------------------- /readers/wagdav.txt: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /readers/wtadler.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/wtadler.txt -------------------------------------------------------------------------------- /readers/xfst.txt: -------------------------------------------------------------------------------- 1 | Many thanks for the good explanation. 2 | Much appreciated! 3 | xfst-20220813 -------------------------------------------------------------------------------- /readers/xhannahxh.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/xhannahxh.txt -------------------------------------------------------------------------------- /readers/ynomitna.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/ynomitna.txt -------------------------------------------------------------------------------- /readers/zia1138.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jdblischak/git-for-science/ae5089ad296680d31f227b0985b7238e504735f3/readers/zia1138.txt -------------------------------------------------------------------------------- /share-your-code.tex: -------------------------------------------------------------------------------- 1 | \section*{Share your code} 2 | 3 | Once you have your files saved in a Git repository, you can share it with your collaborators and the wider scientific community by putting your code online (Fig. \ref{fig:Fig3}). 4 | This also has the added benefit of creating a backup of your scripts and provides a mechanism for transferring your files across multiple computers. 5 | Sharing a repository is made easier if you use one of the many online services that host Git repositories (Table 1), e.g. GitHub. 6 | Note, however, that any files that have not been tracked with at least one commit are not included in the Git repository, even if they are located within the same directory on your local computer (see Box 2 for advice on the types of files that should not be versioned with Git and Box 3 for advice on managing large files). 7 | 8 | Below we focus on the technical aspects of sharing your code. 9 | However, there are also other issues to consider when deciding if and how you are going to make your code available to others. 10 | For quick advice on these subjects, see Box 4 on how to license your code, Box 5 on concerns about being scooped, and Box 6 on the increasing trend of journals to institute sharing policies that require authors to deposit code in a public archive upon publication. 11 | 12 | To begin using GitHub, you will first need to sign up for an account. 13 | For the code examples in this tutorial, you will need to replace \verb|username| with the username of your account. 14 | Next choose the option to ``Create a new repository'' (Fig. \ref{fig:Fig3}B, see \href{https://help.github.com/articles/create-a-repo/}{help.github.com/articles/create-a-repo}). 15 | Call it ``thesis'' because that is the directory name containing the files on your computer, but note that you can give it a different name on GitHub if you wish. 16 | Also, now that the code will be existing in multiple places, you need to learn some more terminology (Box 1). 17 | A local repository refers to code that is stored on the machine you are using, e.g. your laptop; whereas, a remote repository refers to the code that is hosted online. 18 | Thus, you have just created a remote repository. 19 | 20 | Now you need to send the code on your computer to GitHub. 21 | The key to this is the URL that GitHub assigns your newly created remote repository. 22 | It will have the form \verb|https://github.com/username/thesis.git| (see \href{https://help.github.com/articles/cloning-a-repository/}{help.github.com/articles/cloning-a-repository}). 23 | Notice that this URL is using the HTTPS protocol, which is the quickest to begin using. 24 | However it requires you to enter your username and password when communicating with GitHub, so you'll want to considering switching to the SSH protocol once you are regularly using Git and GitHub (see \href{https://help.github.com/articles/generating-ssh-keys/}{help.github.com/articles/generating-ssh-keys} for directions). 25 | In order to link the local thesis repository on your computer to the remote repository you just created, in your local repository you need to tell Git the URL of the remote repository using the command \verb|git remote add| (Fig. \ref{fig:Fig3}C). 26 | 27 | \begin{verbatim} 28 | $ git remote add origin https://github.com/username/thesis.git 29 | \end{verbatim} 30 | 31 | The name ``origin'' is a bookmark for the remote repository so that you do not have to type out the full URL every time you transfer your changes (this is the default name for a remote repository, but you could use another name if you like). 32 | 33 | Send your code to GitHub using the command \verb|git push| (Fig. \ref{fig:Fig3}D). 34 | 35 | \begin{verbatim} 36 | $ git push origin master 37 | \end{verbatim} 38 | 39 | You first specify the remote repository, ``origin''. 40 | Second, you tell Git to push to the ``master'' copy of the repository - we will not go into other options in this tutorial, but Box 7 discusses them briefly. 41 | 42 | Pushing to GitHub also has the added benefit of backing up your code in case anything were to happen to your computer. 43 | Also, it can be used to manually transfer your code across multiple machines, similar to a service like Dropbox (\href{www.dropbox.com}{dropbox.com}), but with the added capabilities and control of Git. 44 | For example, what if you wanted to work on your code on your computer at home? 45 | You can download the Git repository using the command \verb|git clone|. 46 | 47 | \begin{verbatim} 48 | $ git clone https://github.com/username/thesis.git 49 | \end{verbatim} 50 | 51 | By default, this will download the Git repository into a local directory named ``thesis''. 52 | Furthermore, the remote ``origin'' will automatically be added so that you can easily push your changes back to GitHub. 53 | You now have copies of your repository on your work computer, your GitHub account online, and your home computer. 54 | You can make changes, commit them on your home computer, and send those commits to the remote repository with \verb|git push|, just as you did on your work computer. 55 | 56 | Then the next day back at your work computer, you could update the code with the changes you made the previous evening using the command \verb|git pull|. 57 | 58 | \begin{verbatim} 59 | $ git pull origin master 60 | \end{verbatim} 61 | 62 | This pulls in all the commits that you had previously pushed to the GitHub remote repository from your home computer. 63 | In this workflow, you are essentially collaborating with yourself as you work from multiple computers. 64 | If you are working on a project with just one or two other collaborators, you could extend this workflow so that they could edit the code in the same way. 65 | You can do this by adding them as Collaborators on your repository (Settings -\textgreater Collaborators -\textgreater Add collaborator, see \href{https://help.github.com/articles/adding-collaborators-to-a-personal-repository/}{help.github.com/articles/adding-collaborators-to-a-personal-repository}). 66 | However, with projects with lots of contributors, GitHub provides a workflow for finer-grained control of the code development. 67 | 68 | With the addition of a GitHub account and a few commands for sending and receiving code, you can now share your code with others, transfer your code across multiple machines, and setup simple collaborative workflows. 69 | -------------------------------------------------------------------------------- /submission.md: -------------------------------------------------------------------------------- 1 | Article Type: Education 2 | 3 | Title - A quick introduction to version control with Git and GitHub 4 | 5 | Abstract: NA 6 | 7 | Many Education articles do not have an abstract, e.g. [Bassi 2007][bassi2007] and [Brazas et al. 2014][brazas2014]. 8 | 9 | [bassi2007]: http://journals.plos.org/ploscollections/article?id=10.1371/journal.pcbi.0030199 10 | [brazas2014]: http://journals.plos.org/ploscollections/article?id=10.1371/journal.pcbi.1003510 11 | 12 | Classifications: 13 | 14 | * 20.330.70: Software development 15 | * 20.330: Software engineering 16 | * 20: Computer and information sciences 17 | * 20.330.80: Software tools 18 | 19 | Competing Interest 20 | 21 | The authors have declared that no competing interests exist. 22 | 23 | Financial Disclosure 24 | 25 | JDB is supported by National Institutes of Health grant AI087658 awarded to Yoav Gilad. 26 | The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript. 27 | 28 | Previous Interactions 29 | 30 | B. F. Francis Ouellette invited us via email to write this article for the Education collection. 31 | 32 | Collections: Education 33 | 34 | Have you been invited to submit to a PLOS Special Collection? No 35 | -------------------------------------------------------------------------------- /supporting-information-legends.tex: -------------------------------------------------------------------------------- 1 | \section*{Supporting Information Legends} 2 | 3 | % Include only the SI item label in the subsection heading. Use the \nameref{label} command to cite SI items in the text. 4 | \subsection*{S1 Data} 5 | \label{S1_Data} 6 | {\bf process.sh.} 7 | This Bash script downloads the ENCODE CTCF ChIP-seq data from multiple types of kidney samples and calls peaks. 8 | See \href{https://github.com/jdblischak/git-for-science/tree/master/code}{github.com/jdblischak/git-for-science/tree/master/code} for instructions on running it. 9 | 10 | \subsection*{S2 Data} 11 | \label{S2_Data} 12 | {\bf clean.py.} 13 | This Python script filters peaks with a fold change cutoff and merges peaks from the different kidney samples. 14 | See \href{https://github.com/jdblischak/git-for-science/tree/master/code}{github.com/jdblischak/git-for-science/tree/master/code} for instructions on running it. 15 | 16 | \subsection*{S3 Data} 17 | \label{S3_Data} 18 | {\bf analyze.R.} 19 | This R script creates diagnostic plots on the length of the peaks and their distribution across the genome. 20 | See \href{https://github.com/jdblischak/git-for-science/tree/master/code}{github.com/jdblischak/git-for-science/tree/master/code} for instructions on running it. 21 | -------------------------------------------------------------------------------- /table-1-resources.tex: -------------------------------------------------------------------------------- 1 | \section*{Table 1: Resources} 2 | 3 | \begin{tabular}{|l|l|} 4 | \hline 5 | \textbf{Resource} & \textbf{Options} \\ \hline 6 | Distibuted VCS & Git (\href{https://git-scm.com}{git-scm.com}) \\ \hline 7 | & Mercurial (\href{https://mercurial.selenic.com}{mercurial.selenic.com}) \\ \hline 8 | & Bazaar (\href{http://bazaar.canonical.com}{bazaar.canonical.com}) \\ \hline 9 | Online hosting site & GitHub (\href{https://github.com}{github.com}) \\ \hline 10 | & Bitbucket (\href{https://bitbucket.org}{bitbucket.org}) \\ \hline 11 | & GitLab (\href{https://about.gitlab.com}{gitlab.com}) \\ \hline 12 | & Source Forge (\href{http://sourceforge.net}{sourceforge.net}) \\ \hline 13 | Git installation & \href{https://git-scm.com/downloads}{git-scm.com/downloads} \\ \hline 14 | Git Tutorials & Software Carpentry(\href{https://swcarpentry.github.io/git-novice}{swcarpentry.github.io/git-novice}) \\ \hline 15 | & Pro Git (\href{https://git-scm.com/book}{git-scm.com/book}) \\ \hline 16 | & A Visual Git Reference (\href{https://marklodato.github.io/visual-git-guide}{marklodato.github.io/visual-git-guide}) \\ \hline 17 | & tryGit (\href{https://try.github.io}{try.github.io}) \\ \hline 18 | Graphical User Interface for Git & \href{https://git-scm.com/downloads/guis}{git-scm.com/downloads/guis} \\ \hline 19 | \end{tabular} 20 | -------------------------------------------------------------------------------- /title.tex: -------------------------------------------------------------------------------- 1 | A quick introduction to version control with Git and GitHub -------------------------------------------------------------------------------- /tutorial.sh: -------------------------------------------------------------------------------- 1 | # Setup 2 | mkdir -p ../thesis 3 | cp code/* ../thesis 4 | cd ../thesis 5 | 6 | # Version your code 7 | git init 8 | git config user.name "First Last" 9 | git config user.email "user@domain" 10 | git status 11 | git add process.sh 12 | git status 13 | git add clean.py analyze.R 14 | git commit -m "Add initial version of thesis code." 15 | git log 16 | # Change fc_cutoff in clean.py 17 | # +fc_cutoff = 20 18 | # -fc_cutoff = 10 19 | nano -w clean.py 20 | git diff 21 | git checkout -- clean.py 22 | git diff 23 | git checkout 660213b clean.py 24 | -------------------------------------------------------------------------------- /version-your-code.tex: -------------------------------------------------------------------------------- 1 | \section*{Version your code} 2 | 3 | The first step is to learn how to version your own code. 4 | In this tutorial, we will run Git from the command line of the Unix shell. 5 | Thus we expect readers are already comfortable with navigating a filesystem and running basic commands in such an environment. 6 | You can find directions for installing Git for the operating system running on your computer by following one of the links provided in Table 1. 7 | There are many graphical user interfaces (GUIs) available for running Git (Table 1), which we encourage you to explore, but learning to use Git on the command line is necessary for performing more advanced operations and using Git on a remote machine. 8 | 9 | To follow along, first create a folder in your home directory named \verb|thesis|. 10 | Next download the three files provided in Supporting Information and place them in the \verb|thesis| directory. 11 | Imagine that as part of your thesis you are studying the transcription factor CTCF, and you want to identify high-confidence binding sites in kidney epithelial cells. 12 | To do this, you will utilize publicly available ChIP-seq data produced by the ENCODE consortium \cite{22955616}. 13 | ChIP-seq is a method for finding the sites in the genome where a transcription factor is bound, and these sites are referred to as peaks \cite{24244136}. 14 | \verb|process.sh| downloads the ENCODE CTCF ChIP-seq data from multiple types of kidney samples and calls peaks (\nameref{S1_Data}), 15 | \verb|clean.py| filters peaks with a fold change cutoff and merges peaks from the different kidney samples (\nameref{S2_Data}), 16 | and \verb|analyze.R| creates diagnostic plots on the length of the peaks and their distribution across the genome (\nameref{S3_Data}). 17 | 18 | If you have just installed Git, the first thing you need to do is provide some information about yourself, since it records who makes each change to the file(s). 19 | Set your name and email by running the following lines, but replacing ``First Last'' and ``user@domain'' with your full name and email address, respectively. 20 | 21 | \begin{verbatim} 22 | $ git config --global user.name "First Last" 23 | $ git config --global user.email "user@domain" 24 | \end{verbatim} 25 | 26 | To start versioning your code with Git, navigate to your newly created directory, \verb|~/thesis|. 27 | Run the command \verb|git init| to initialize the current folder as a Git repository (Fig. \ref{fig:Fig1}, \ref{fig:Fig2}A). 28 | A repository (or repo, for short) refers to the current version of the tracked files as well as all the previously saved versions (Box 1). 29 | Only files that are located within this directory (and any subdirectories) have the potential to be version controlled, 30 | i.e. Git ignores all files outside of the initialized directory. 31 | For this reason, projects under version control tend to be stored within a single directory to correspond with a single Git repository. 32 | For strategies on how to best organize your own projects, see Noble, 2009 \cite{19649301}. 33 | 34 | \begin{verbatim} 35 | $ cd ~/thesis 36 | $ ls 37 | analyze.R clean.py process.sh 38 | $ git init 39 | Initialized empty Git repository in ~/thesis/.git/ 40 | \end{verbatim} 41 | 42 | Now you are ready to start versioning your code (Fig. \ref{fig:Fig1}). 43 | Conceptually, Git saves snapshots of the changes you make to your files whenever you instruct it to. 44 | For instance, after you edit a script in your text editor, you save the updated script to your \verb|thesis| folder. 45 | If you tell Git to save a shapshot of the updated document, then you will have a permanent record of the file in that exact version even if you make subsequent edits to the file. 46 | In the Git framework, any changes you have made to a script, but have not yet recorded as a snapshot with Git, reside in the working directory only (Fig. \ref{fig:Fig1}). 47 | To follow what Git is doing as you record the initial version of your files, use the informative command \verb|git status|. 48 | 49 | \begin{verbatim} 50 | $ git status 51 | On branch master 52 | 53 | Initial commit 54 | 55 | Untracked files: 56 | (use "git add ..." to include in what will be committed) 57 | 58 | analyze.R 59 | clean.py 60 | process.sh 61 | 62 | nothing added to commit but untracked files present (use "git add" to track) 63 | \end{verbatim} 64 | 65 | There are a few key things to notice from this output. 66 | First, the three scripts are recognized as untracked files because you have not told Git to start tracking anything yet. 67 | Second, the word ``commit'' is Git terminology for snapshot. 68 | As a noun it means ``a version of the code'', e.g. ``the figure was generated using the commit from yesterday'' (Box 1). 69 | This word can also be used as a verb, in which case it means ``to save'', e.g. ``to commit a change.'' 70 | Lastly, the output explains how you can track your files using \verb|git add|. 71 | Start tracking the file \verb|process.sh|. 72 | 73 | \begin{verbatim} 74 | $ git add process.sh 75 | \end{verbatim} 76 | 77 | And check its new status. 78 | 79 | \begin{verbatim} 80 | $ git status 81 | On branch master 82 | 83 | Initial commit 84 | 85 | Changes to be committed: 86 | (use "git rm --cached ..." to unstage) 87 | 88 | new file: process.sh 89 | 90 | Untracked files: 91 | (use "git add ..." to include in what will be committed) 92 | 93 | analyze.R 94 | clean.py 95 | \end{verbatim} 96 | 97 | Since this is the first time that you have told Git about the file \verb|process.sh|, two key things have happened. 98 | First, this file is now being tracked, which means Git recognizes it as a file you wish to be version controlled (Box 1). 99 | Second, the changes made to the file (in this case the entire file because it is the first commit) have been added to the staging area (Fig. \ref{fig:Fig1}). 100 | Adding a file to the staging area will result in the changes to that file being included in the next commit, or snapshot of the code (Box 1). 101 | As an analogy, adding files to the staging area is like putting things in a box to mail off, and committing is like putting the box in the mail. 102 | 103 | Since this will be the first commit, or first version of the code, use \verb|git add| to begin tracking the other two files and add their changes to the staging area as well. 104 | Then create the first commit using the command \verb|git commit|. 105 | 106 | \begin{verbatim} 107 | $ git add clean.py analyze.R 108 | $ git commit -m "Add initial version of thesis code." 109 | [master (root-commit) 660213b] Add initial version of thesis code. 110 | 3 files changed, 154 insertions(+) 111 | create mode 100644 analyze.R 112 | create mode 100644 clean.py 113 | create mode 100644 process.sh 114 | \end{verbatim} 115 | 116 | Notice the flag \verb|-m| was used to pass a message for the commit. 117 | This message describes the changes that have been made to the code and is required. 118 | If you do not pass a message at the command line, the default text editor for your system will open so you can enter the message. 119 | You have just performed the typical development cycle with Git: 120 | make some changes, add updated files to the staging area, and commit the changes as a snapshot once you are satisfied with them (Fig. \ref{fig:Fig2}). 121 | 122 | Since Git records all of the commits, you can always look through the complete history of a project. 123 | To view the record of your commits, use the command \verb|git log|. 124 | For each commit, it lists the unique identifier for that revision, author, date, and commit message. 125 | 126 | \begin{verbatim} 127 | $ git log 128 | commit 660213b91af167d992885e45ab19f585f02d4661 129 | Author: First Last 130 | Date: Fri Aug 21 14:52:05 2015 -0500 131 | 132 | Add initial version of thesis code. 133 | \end{verbatim} 134 | 135 | The commit identifier can be used to compare two different versions of a file, restore a file to a previous version from a past commit, and even retrieve tracked files if you accidentally delete them. 136 | 137 | Now you are free to make changes to the files knowing that you can always revert them to the state of this commit by referencing its identifier. 138 | As an example, edit \verb|clean.py| so that the fold change cutoff for filtering peaks is more stringent. 139 | Here is the current bottom of the file. 140 | 141 | \begin{verbatim} 142 | $ tail clean.py 143 | # Filter based on fold-change over control sample 144 | fc_cutoff = 10 145 | epithelial = epithelial.filter(filter_fold_change, fc = fc_cutoff).saveas() 146 | proximal_tube = proximal_tube.filter(filter_fold_change, fc = fc_cutoff).saveas() 147 | kidney = kidney.filter(filter_fold_change, fc = fc_cutoff).saveas() 148 | # Identify only those sites that are peaks in all three tissue types 149 | combined = pybedtools.BedTool().multi_intersect( 150 | i = [epithelial.fn, proximal_tube.fn, kidney.fn]) 151 | union = combined.filter(lambda x: int(x[3]) == 3).saveas() 152 | union.cut(range(3)).saveas(data + "/sites-union.bed") 153 | \end{verbatim} 154 | 155 | Using a text editor, increase the fold change cutoff from 10 to 20. 156 | 157 | \begin{verbatim} 158 | $ tail clean.py 159 | # Filter based on fold-change over control sample 160 | fc_cutoff = 20 161 | epithelial = epithelial.filter(filter_fold_change, fc = fc_cutoff).saveas() 162 | proximal_tube = proximal_tube.filter(filter_fold_change, fc = fc_cutoff).saveas() 163 | kidney = kidney.filter(filter_fold_change, fc = fc_cutoff).saveas() 164 | # Identify only those sites that are peaks in all three tissue types 165 | combined = pybedtools.BedTool().multi_intersect( 166 | i = [epithelial.fn, proximal_tube.fn, kidney.fn]) 167 | union = combined.filter(lambda x: int(x[3]) == 3).saveas() 168 | union.cut(range(3)).saveas(data + "/sites-union.bed") 169 | \end{verbatim} 170 | 171 | Because Git is tracking \verb|clean.py|, it recognizes that the file has been changed since the last commit. 172 | 173 | \begin{verbatim} 174 | $ git status 175 | # On branch master 176 | # Changes not staged for commit: 177 | # (use "git add ..." to update what will be committed) 178 | # (use "git checkout -- ..." to discard changes in working directory) 179 | # 180 | # modified: clean.py 181 | # 182 | no changes added to commit (use "git add" and/or "git commit -a") 183 | \end{verbatim} 184 | 185 | The report from \verb|git status| indicates that the changes to \verb|clean.py| are not staged, i.e. they are in the working directory (Fig. \ref{fig:Fig1}). 186 | To view the unstaged changes, run the command \verb|git diff|. 187 | 188 | \begin{verbatim} 189 | $ git diff 190 | diff --git a/clean.py b/clean.py 191 | index 7b8c058..76d84ce 100644 192 | --- a/clean.py 193 | +++ b/clean.py 194 | @@ -28,7 +28,7 @@ def filter_fold_change(feature, fc = 1): 195 | return False 196 | 197 | # Filter based on fold-change over control sample 198 | -fc_cutoff = 10 199 | +fc_cutoff = 20 200 | epithelial = epithelial.filter(filter_fold_change, fc = fc_cutoff).saveas() 201 | proximal_tube = proximal_tube.filter(filter_fold_change, fc = fc_cutoff).saveas() 202 | kidney = kidney.filter(filter_fold_change, fc = fc_cutoff).saveas() 203 | \end{verbatim} 204 | 205 | Any lines of text that have been added to the script are indicated with a \verb|+| and any lines that have been removed with a \verb|-|. 206 | Here, we altered the line of code which sets the value of \verb|fc_cutoff|. 207 | \verb|git diff| displays this change as the previous line being removed and a new line being added with our update incorporated. 208 | You can ignore the first five lines of output because they are directions for other software programs that can merge changes to files. 209 | If you wanted to keep this edit, you could add \verb|clean.py| to the staging area using \verb|git add| and then commit the change using \verb|git commit|, as you did above. 210 | Instead, this time undo the edit by following the directions from the output of \verb|git status| to ``discard changes in the working directory'' using the command \verb|git checkout|. 211 | 212 | \begin{verbatim} 213 | $ git checkout -- clean.py 214 | $ git diff 215 | \end{verbatim} 216 | 217 | Now \verb|git diff| returns no output because \verb|git checkout| undid the unstaged edit you had made to \verb|clean.py|. 218 | And this ability to undo past edits to a file is not limited to unstaged changes in the working directory. 219 | If you had committed multiple changes to the file \verb|clean.py| and then decided you wanted the original version from the initial commit, you could replace the argument \verb|--| with the commit identifier of the first commit you made above (your commit identifier will be different; use \verb|git log| to find it). 220 | The \verb|--| used above was simply a placeholder for the first argument because by default \verb|git checkout| restores the most recent version of the file from the staging area (if you haven't staged any changes to this file, as is the case here, the version of the file in the staging area is identical to the version in the last commit). 221 | Instead of using the entire commit identifier, use only the first seven characters, which is simply a convention since this is usually long enough for it to be unique. 222 | 223 | \begin{verbatim} 224 | $ git checkout 660213b clean.py 225 | \end{verbatim} 226 | 227 | At this point, you have learned the commands needed to version your code with Git. 228 | Thus you already have the benefits of being able to make edits to files without copying them first, to create a record of your changes with accompanying messages, and to revert to previous versions of the files if needed. 229 | Now you will always be able to recreate past results that were generated with previous versions of the code (see the command \verb|git tag| for a method to facilitate finding specific past versions) and see the exact changes you have made over the course of a project. 230 | --------------------------------------------------------------------------------