biocode

Bioinformatics code libraries and scripts

https://github.com/jorvis/biocode

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    6 of 19 committers (31.6%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Bioinformatics code libraries and scripts

Basic Info
  • Host: GitHub
  • Owner: jorvis
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 7.29 MB
Statistics
  • Stars: 542
  • Watchers: 32
  • Forks: 253
  • Open Issues: 26
  • Releases: 5
Created almost 13 years ago · Last pushed 12 months ago
Metadata Files
Readme Changelog License

README.rst

Overview
========

This is a collection of bioinformatics scripts many have found useful
and code modules which make writing new ones a lot faster.

Over the years most bioinformatics people amass a collection of small
utility scripts which make their lives easier. Too often they are kept
either in private repositories or as part of a public collection to
which noone else can contribute. Biocode is a curated repository of
general-use utility scripts my colleagues and I have found useful and
want to share with others. I have also developed some code
libraries/modules which have made my scripting work a lot easier. Some
have found these to be more useful than the scripts themselves.

Look below if you want to learn more, contribute code yourself, or just
get the scripts.

-- Joshua Orvis

The scripts
===========

The scope here is intentionally very open. I want to include anything
that developers find generally useful. There are no limitations on
language choice, though the majority are Python. For now, the following
directories make up the initial groupings but will be expanded as
needed:

-  blast - It if uses, massages, or just reformats BLAST output, it goes
   here.
-  chado - Scripts that are tied into the chado schema (gmod.org) should
   be found here.
-  fasta - Filtering, converting, size distribution plots, etc.
-  fastq - Utilities for fasta's newer sister format.
-  genbank - Anything related to the GenBank? Flat File Format.
-  general - Utility scripts that may not fit in any other existing
   directory or don't warrant creation of their own. We should be
   selective about what we put here and create or use other directories
   whenever appropriate.
-  gff - Extractions, conversions and manipulations of files in the
   `Generic Feature Format `__
-  gtf - From Ensembl/WashU, the GTF format is the focus of scripts
   here.
-  hmm - Merging, manipulating or reading HMM libraries.
-  sam\_bam - Analysis of and parsing SAM/BAM files.
-  sandbox - Each committer gets their own personal directory here to
   add anything they want while testing or waiting to be moved to the
   production directories.
-  sysadmin - While not specifically bioinformatics, our work tends to
   be on Unix machines, and utility scripts are often needed to support
   our work. From file system manipulation to database backup scripts,
   put your generic sysadmin utilities here.
-  taxonomy - Anything related to taxonomic analysis.

The modules
===========

If you're a developer these modules can save a lot of time. Yes, there
is some duplicate functionality you'll find in modules like
`Biopython `__, but these were
written to add features I always wanted and with a more
biologically-focused API.

Three of the primary Python modules:

`biocode.things `__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Classes here represent biological things (as defined by the `Sequence
Ontology `__) in a way that makes more
sense biologically and hiding some of the CS abstraction. What does this
mean? This is a simple example, but compare these syntax approaches:

::

    # This way is typical of other libraries
    genes = assembly.get_subfeatures_by_type( 'type': 'genes' )
    mRNAs = assembly.get_subfeatures_by_type( 'type': 'mRNA' )

    # And instead, in biothings:
    genes = assembly.genes()
    for gene in genes:
        mRNAs = gene.mRNAs()

This more direct approach is held throughout these libraries. It also
adds some shortcuts for tasks that always annoyed me when working with
things that had coordinates. Consider if you wanted to determine if one
gene is before another one on a molecule:

::

    if gene1 < gene2:
        return True

In the background, biocode checks if the two gene objects are located on
the same molecule and, if so, compares their coordinates. There are many
other methods for coordinate comparison, such as:

-  thing1 <= thing2 : The thing1 overlaps thing2 on the 5' end
-  thing1.contained\_within( thing2 )
-  thing1.overlaps( thing2 )
-  thing1.overlap\_size\_with( thing2 )

This module also contains readable and detailed documention within the
`source
code `__.

`biocode.annotation `__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This set of classes allows formal definition of functional annotation
which can be attached to various biothings. These include gene product
names, gene symbols, EC numbers, GO terms, etc. Once annotated, the
biothings can be written out in common formats such as GFF3, GenBank,
NCBI tbl, etc.

`biocode.gff `__
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Much of biocode was written while working with genomic data and
annotation, and one of the more common formats for storing these is
`GFF3 `__. Using this
module, you can parse a GFF3 file of annotations into a set of biothings
with a single line of code. For example:

::

    import biocode.gff

    (assemblies, features) = biocode.gff.get_gff3_features( input_file_path )

That's it. You can then iterate over the assemblies and their children,
or access the 'features' dict, which is keyed on each feature's ID.

Installing dependencies
=======================

On Debian-based systems (like Ubuntu) you can be sure to get all biocode
dependencies like this:

::

   apt-get install -y python3 python3-pip zlib1g-dev libblas-dev liblapack-dev libxml2-dev

Getting the code (docker)
=========================

Each release is available on DockerHub here:

::

    https://hub.docker.com/repository/docker/jorvis/biocode
   
Getting the code (pip3, latest release)
=======================================

You can install biocode using pip3 (requires Python3) like this:

::

    pip3 install biocode

Getting the code (github, current trunk)
========================================

If you want the latest developer version:

::

    git clone https://github.com/jorvis/biocode.git

**Important**: Many of these scripts use the modules in the biocode/lib
directory, so you'll need to point Python to them. Full setup example:

::

    cd /opt
    git clone https://github.com/jorvis/biocode.git

    # You probably want to add this line to your $HOME/.bashrc file
    export PYTHONPATH=/opt/biocode/lib:$PYTHONPATH

Problems / Suggestions?
=======================

If you encounter any issues with the existing code, or would like to
request new features or scripts please submit to the `Issue tracking
system `__.

Contributing
============

If you'd like to contribute code to this collection have a look at the
`Requirements And Convention
Guide `__
and then submit a pull request once your code is ready. We'll check your
script and pull it into the production directories. If you're not that
confident yet we'll happily pull in your sandbox directory if you'd like
to add your code to the project but aren't sure if it's ready to be in
the production directories yet.

Owner

  • Name: Joshua Orvis
  • Login: jorvis
  • Kind: user
  • Location: Tulsa, OK, USA
  • Company: Institute for Genome Sciences

Bioinformatics guy at @IGS where my primary projects involve genome annotation (prok, euk and meta) and expression analysis. Also a grad professor at Hopkins.

GitHub Events

Total
  • Create event: 2
  • Issues event: 2
  • Release event: 1
  • Watch event: 46
  • Issue comment event: 5
  • Push event: 6
  • Pull request event: 1
  • Fork event: 7
Last Year
  • Create event: 2
  • Issues event: 2
  • Release event: 1
  • Watch event: 46
  • Issue comment event: 5
  • Push event: 6
  • Pull request event: 1
  • Fork event: 7

Committers

Last synced: over 1 year ago

All Time
  • Total Commits: 997
  • Total Committers: 19
  • Avg Commits per committer: 52.474
  • Development Distribution Score (DDS): 0.172
Past Year
  • Commits: 7
  • Committers: 1
  • Avg Commits per committer: 7.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Joshua Orvis j****s@g****m 826
jorvis j****s@3****9 118
Jonathan Crabtree j****e@g****m 14
Priti Kumari p****8@g****u 11
ktretina k****a@g****m 4
RPINerd r****d@g****m 3
Kyle Tretina k****a@m****u 3
priti.aries88@gmail.com p****8@g****m@3****9 3
sicHiRsch j****r@g****m 2
Erik Kastman e****n@g****m 2
Jonathan Crabtree j****e@j****u 2
Priti Kumari p****i@p****u 2
Arnaud Belcour 1****r 1
Katherine Eaton k****n@g****m 1
Martin Fitzpatrick m****k@g****m 1
Michael R. Crusoe m****e@m****u 1
Zhipeng.Gao z****o@m****u 1
(no author) (****)@3****9 1
pgonzale60 p****0 1

Issues and Pull Requests

Last synced: 11 months ago

All Time
  • Total issues: 60
  • Total pull requests: 24
  • Average time to close issues: 3 months
  • Average time to close pull requests: 25 days
  • Total issue authors: 29
  • Total pull request authors: 16
  • Average comments per issue: 2.7
  • Average comments per pull request: 1.04
  • Merged pull requests: 17
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 1
  • Average time to close issues: 3 months
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 5.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jorvis (13)
  • ktretina (7)
  • jonathancrabtree (6)
  • mchibucos (3)
  • PlantDr430 (3)
  • shuhailaMSR (2)
  • stanislasmorand (2)
  • arsilan324 (2)
  • nsuvarnaiari (1)
  • pezhmansafdari (1)
  • j-bacal (1)
  • PengXieAMJ (1)
  • gjaqu054 (1)
  • nhartwic (1)
  • lfaino (1)
Pull Request Authors
  • jonathancrabtree (5)
  • priti88 (3)
  • pgonzale60 (2)
  • RPINerd (2)
  • mr-c (1)
  • pirekupcode (1)
  • kastman (1)
  • szhorvat (1)
  • JWDebler (1)
  • christopher-holt (1)
  • ArnaudBelcour (1)
  • CSynodinos (1)
  • Mona-2022 (1)
  • beyondacm (1)
  • ktmeaton (1)
Top Labels
Issue Labels
bug (12) enhancement (9)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 175 last-month
  • Total docker downloads: 96
  • Total dependent packages: 0
  • Total dependent repositories: 1
  • Total versions: 28
  • Total maintainers: 1
pypi.org: biocode

Bioinformatics code libraries and scripts

  • Versions: 28
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 175 Last month
  • Docker Downloads: 96
Rankings
Docker downloads count: 2.9%
Stargazers count: 3.2%
Forks count: 3.4%
Average: 8.7%
Dependent packages count: 10.0%
Downloads: 10.7%
Dependent repos count: 21.8%
Maintainers (1)
Last synced: 11 months ago

Dependencies

build/Dockerfile docker
  • ubuntu 18.04 build