UTA – Universal Transcript Archive¶
UTA is a data archive and set of tools that aims to improve the precision of sequence-based descriptions of genomic variation. It will eventually contain transcripts and alignments to multiple reference genomes using multiple algorithms, as obtained from from NCBI, Ensembl, LRG, and UCSC.
Contents¶
Overview¶
The UTA stores transcripts aligned to genome reference assemblies using multiple methods in order to improve the precision and accuracy by which the scientific and clinical communities describe variants.
It facilities the following:
- enabling an interpretation of variants reported in literature against obsolete transcript records
- identifying regions where transcript and reference genome sequence assemblies disagree
- characterizing transcripts of the same gene across transcript sources
- projecting (“lifting over”) variants from one transcript to another
- identifying transcripts and genomic regions with ambiguous alignments that may affect clinical interpretation
- querying for multiple transcript sources through a single interface
Database¶
Schema¶
Loading UTA¶
These docs are in flux as the database loading process matures.
Overview¶
Loading occurs in three distinct stages:
- extraction and translation from data sources into intermediate files;
- loading from intermediates into UTA;
- generating new exon alignments within UTA.
The extraction/translation scripts, which are specific for each source, are in uta/sbin/. Each script reads from one source and writes one or more intermediates in formats that are specified in uta/formats/. The intermediate file formats are indpendent of source.
Loading is largely driven by loading/Makefile.
Updated 2014-08-29 Tested with Ubuntu 14.04, x86_64, PostgreSQL 9.3.4
Preparing a PostgreSQL cluster and database¶
You may specify certain PostgreSQL options using environment variables or command line options. For readability, these instructions use environment variables:
export PGDATA=/local/home/reece/var/pg/9.4
export PGHOST=localhost
export PGPORT=5432
export PGDATABASE=uta_dev
First, create the PostgreSQL cluster if you do not have one already installed:
initdb -D $PGDATA
perl -i.bak -pe "s/#port = 5432/port = $PGPORT/" $PGDATA/postgresql.conf
pg_ctl -D $PGDATA -l logfile start
By default, PostgreSQL specifies local “trust” authentication in pg_hba.conf for local connections.
Then, create users and a uta database:
createuser uta_admin
createuser uta_public
createdb -O uta_admin uta_dev
Install UTA¶
The scripts necessary to build the UTA database are in the UTA repo.
mkvirtualenv uta
hg clone ssh://hg@bitbucket.org/biocommons/uta uta_dev
cd uta_dev
make develop
# TODO: error the first time (re: distribute package). Second time was clean. Figure this out.
make develop
Prepare intermediate files¶
Sequences¶
UTA requires sequence data for every sequence that is referenced in the intermediate files. Fasta files (with .fa, .fna, .faa, or .fasta filename extensions) should be placed at the root of a single directory. The path is specified in etc/global.conf.
[sequences] fasta_directory = /locus/data/core-rest/2014-01/sequences
NCBI¶
Data from NCBI are pulled using tools in a separate repo. Briefly:
Type make update
When this is completed, you will have a dated snapshot of NCBI data used by UTA.
Make a symlink to the source data directory:
cd loading/aux ln -s ../../../mirrors-ncbi # adjust as necessary
The loading makefile will pull data from that source as necessary
Ensembl¶
LRG¶
Preparing test data¶
These data are used for testing and therefore committed with the repo. You probably don’t need to rebuild them.
make test-data
Data Loading¶
The general command to load data is:
cd loading
make uta-build DATA=<dataset> CONF=<confname>
DATA specifies a directory of intermediate files in loading/<dataset> to be loaded
CONF specifies a config file in ../etc/ for connection parameters
Testing Loading¶
uta/loading/test contains a set of intermediate files to test the loading process. These files are part of the UTA repository.
For testing, type:
make uta-build DATA=test CONF=test
If that fails:
psql -p $PGPORT -d <db> -c 'drop schema uta1 cascade'
make cleanest
and retry.
Create and load a database¶
make uta-build DATA=main CONF=dev
Push to RDS¶
The current practice is to dump UTA, then restore to Amazon RDS for the public instance (uta.invitae.com).
- ::
- sname=uta_20150813 make dumps/$sname.pgd.gz # takes ~5 minutes make push-dev-$sname
The dump and restore each take ~5 minutes. If you don’t care about the intermediate, you can pipe directly of course.
ChangeLog¶
0.2 Series¶
0.2.0a1 (2015-08-13)¶
changes since 0.1.7 (2014-05-10)
Bug Fixes¶
- Removed previous Ensembl data; <0.3% of previous sequences were inconsistent with newer ensembl releases
Changes¶
- Added liftover mechanism to bootstrap new schemas from existing data
- Standardize on “NCBI” as origin name
- When RefSeq transcript exon structures differ between chromosome and patch versions, use chromosome version [0926cf34e173]
- Use explicit sequence sources when loading sequences
- Bumped schema version to 1.1 for addition of associated_accessions and tx_similarity_v
New Features¶
- New data: ensembl-79, refseq 2015-07-31
- Added RefSeq NR (non-coding) transcripts
- Added geneacs (associated accessions)
- Added transcript similarity view [40a4e734d606] with multiple similarity metrics (experimental)
- Added Change Log to documentation
- Developed and documented release flow w/tools
- Implement gene-based data subsets for testing loading
- Explicitly set cds_{start,end}_i to None when not defined in txinfo (for non-coding transcripts) [e82011d1b02c]
Other Changes¶
- Added uta subcommand and make rule to update materialized views [b1f2ef185320]
- Add load-origin from tsv file; update ensembl Makefile rules [dc421df5ef19]
- Added “mega-test” and “the-whole-kielbasa” test targets
- Added indexes to tx_def_summary_mv [c1cda1cfd4c9]
- Enforce FK relationship from exon_set.tx_ac to transcript.ac [ad5309895b5c]
- Facilitate restartability in ensembl-fetch by creating canonical gene order and batching fetches
- Standardize on schema name as uta_1_1 for dev, then rename on release
- Updated code to use new eutils [#171, d831e02f51fa]
- Update to use bioutils instead of bdi [769eea9241e4]
- Updated to use the aligner from uta-tools-align (f.k.a. locus-lib-bio) [a1f492a32f5e]
0.1 Series¶
0.1.7 (2014-05-10)¶
changes since 0.1.6 (2014-01-03)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- use testing.postgresql package rather than existing db for tests [7511b226b3cb]
- #157: commented out align2() method and updated remaining tests in uta.alignment.py [5bdc11f4d45b]
- #157: fixed eutils and genomeutils doctests [d46df3d530f0]
- fixed sqlalchemy tests (finally) [c0031f5e7fbf]
- updated package metadata [a93a4d931fe9]
- bermuda 2014-03 rc5 [d8fd0fa68f60]
- bermuda 2014-03 rc4 [48f3313cb0aa]
- bermuda 2014-03 rc3 [4269d160b881]
- u0 cigars should be semi-delimited [15ee84daefbc]
- merged bermuda1 branch [fe5563ca7be9]
- #147 - can generate test DB or full DB; replaced old version with this one. [0c6c09c4ee4b]
- #147 - incremental checkin; full psql to sqlite works; gcp tests in hgvs pass when using this DB. Still need to create the test DB. [6d4304a2580e]
- added additional header info; added observations [d78405e52a22]
- bermuda-table: fixed bug in human-readable indel coordinates [2fc0fdfa8337]
- bermuda-2014-03 rc 1 [f7290b00a690]
- lots of bermuda work incl. running (but broken) full table [ce0f95070c1b]
- resurrected matchmaker code for ensembl lookup [e93a6eb4471d]
- bermuda2 sql commit/rearrangement [f5fbc045518e]
- commit before rfur-bermuda merge [2e89dac43914]
- added missing dependencies; pull test conf file from TEST_CONF if defined [f1c1906136ba]
- fixed alt_ac bug in tx_3way_v [779176e3064a]
- added eutils to setup.py [80978678ac53]
- sync with default [0ad684c152c5]
- modularized loading (during a reloading test) [cabcff9788d3]
- Makefile sync with sibling projects [297340df627b]
- added trival indel at end discount; updated trival criteria [757124836c56]
- fixed alt_ac in bic exonsets (missing underscore) [6f58c4f333b8]
- close branch with misplaced commits, after grafting to default [2a251272d9c9]
- added stats str to cigar_stats return [7dd970443e12]
- uppercase loaded and aligned sequences [de0804f1528f]
- added misc/uta0-uta1-cigar-cmp [334bce71eed3]
- set role for align_exons (missed because it bypasses the ORM) [23757cca5b3a]
- uppercase loaded and aligned sequences [9b74f39d4847]
- added misc/uta0-uta1-cigar-cmp [f99db269c985]
- set role for align_exons (missed because it bypasses the ORM) [65e0d8f4918f]
- added cigar_stats_is_trivial [49f9e8308dec]
- added bermuda1 changes [7c6a79c0042d]
- added indices; grant-permissions changes [e009003d3009]
- bermuda: materialize WITH NO DATA [76db3edb6afb]
- loading.py: grant permissions to PUBLIC, not uta_public (duh) [839ba03570e0]
- added session authorization to loading.py (and etc/global.conf) [8818b2563744]
- allow multiple conf files [fd36bbe4ab9f]
- updated grant-permissions cli subcommand; removed obsolete sql/grant-public-permissions.sql [a03a7ab00f2a]
- bic data updates to fix headers and cds_start_i; minor loading code updates to handle bic [f44b70588960]
- #28 - fix headers; modify script to use exonset/txinfo writers to ensure consistency. [f345adec505e]
- in-place bic data updates (Rudy will handle scripts); minor loading code updates to handle bic [4ea9106943d5]
- restructured materialized views; added refresh script [12ae8b971a90]
- #37 - exonset, txinfo files, & fasta files for BIC txs. [eb71b7f00a9f]
- #28 - minor fix to script; METHOD=LRG in exonset file. [ba80d13e52cb]
- #28 - removed LRG_347 and LRG_163 fasta files (NR transcripts) from the bundle; not in the txtinfo and exonset files anyway. [13455060b9e3]
- added sql/grant-public-permissions.sql [2dd98f7f92e7]
- store acmg uncompressed (easier copy loading) [75cf356e8bfb]
- added load-sequences to cli [ea0f63cbd27f]
- updated doc link on README [166cba527720]
- auto merge [de41e5ec0125]
- #120 - quick and dirty script to compare uta0/uta1 cigars [430e78a347f5]
- #28 - added fastas; includes 2 fastas (347 & 163) for public transcripts whose data is missing from the LRG TXT export, & thus from the tx info & exonset files. [e6566bbdfe7a]
- #28 - fixed a duplication in the exonset file that comes about when a TX in the TXT export have 2 diff LRG proteins associated (only occurred for LRG_321). [e6f1e0561401]
- #28 - updated inputs based on LRG fix for genomic exon coords on indels for transcripts on negative strands relative to GRChr37. lrg.exonset.gz - METHOD=LRG_download (set in the script). [cafeccb5bd4a]
- updated bermuda-related sql [fbca3f65ccd3]
- updated bermuda views [690bb3fd0c17]
- removed stale scripts in sbin/ [f81c3a0ae714]
- added bermuda_v and lots of other views, mat views, and functions [6797ee052ed9]
- pull fasta directory from conf; add –sql option hack; update loading/README [637b274818bb]
- #28 - script to fetch exon/txinfo; corresponding outputs. These look OK per the inputs from LRG, but the genomic coords for exons with indels relative to GRChr37 don’t match... there may be an error in the LRG outputs. Needs review prior to DB import. [e5e640a842a0]
- forgot to commit grant changes [47c0fe04750f]
- added grant-permissions to cli; added SERPINE1 gene and NC_ seqinfo filtering to test data [3551c6dbf0d8]
- update ensembl origin name and ncbi exonset suffix (missed in previous commit) [e0c628ca4f56]
- seqinfo-filter: allow regexp based filtering (for NCs primarily) [f86dd2c8f5f3]
- uta0-fetch: write fasta file [ab77e5c193a5]
- add cds_md5 to transcript model and compute on loading [2a1e4567564e]
- added loading/README; cleaned up minor filename and scirpt inconsistencies [dd713f1d3f86]
- provide additional feedback during loading txinfo and exonset files [372deb640868]
- moved uta/db/loading.py to uta/loading.py; removed redundant schema declaration with tables [faea54fc6c2c]
- skip existing txinfo where the transcript already exists [94765dce7553]
- added format filters and used to create more comprehensive loading test sets; added seq+seq_anno updating [1dbb0cc1b80f]
- restructured loading/ for test and main [36d5cb8747ff]
- updated loading diagram and added PDF (doc/misc-figures.pdf) [294526dd38df]
- added n_exons to exon_set_exons_v and transcript_exons_v [7dc5bf387cf1]
- fixed bug in ucsc-fetch-exonsets [e099e256efe7]
- ensembl-fetch: skip redundant transcripts; write as .tmp files, then rename [aa60762aa856]
- adding loading/test-data/ncbi.seqinfo.gz (missed from previous commit) [b30330657ca3]
- re-added Seq & SeqAnno to schema; updated testdb loader [539f4527ea6d]
- added doc/misc-figures.odg [61b2bcf97546]
- updated ensembl-fetch to write sequences and catch errors (like undefined transcripts) [503877415cb1]
- first draft of ensembl-fetch [bd54ef964608]
- merged and modified Rudy’s uta0 extraction code [5693b707f3d0]
- Generate uta0 tx & exonset files [b7541cd8f47c]
- updated test-data with larger set of genes and transcripts [caef61089d88]
- added testdb setup (“make -C loading testdb”) [98b3871869db]
- moved sql to top level [1507c0b9f47f]
- removed fetch-align-tasks [338bb23474c6]
- finished switch to Kevin’s aligner (and other minor changes) [6d72928ef63a]
- removed web [7b710b3f5d34]
- implemented alignment with locus_lib_bio; dropped older alignment scripts [9bcb85bf9859]
- added time remaining (based on average speed) to align stats [3dc50158d9ca]
- added exon alignment – cooking with gas now! [551a5c2ce3c3]
- loads full data sets from ncbi and ucsc! [24fd33f0ea44]
- loads genes, txinfo, exonsets for first 100 genes alphabetically [2c9c0afd67ed]
- auto merge [52e5fb383c09]
- #40 - updated script to allow optional creation of a test DB [58f193e75e2e]
- schema overhaul, again: no seq support, inlined accessions (no-dedup); updated gene loading (others pending) [ff1a7c2436c7]
- added ucsc-fetch-exonsets [5504e34b1530]
- allow genes from stdin [4a4823449858]
- updated ncbi-fetch for genes, genomic exon sets, and transcript info [4e0440afc8e9]
- finished (?) ncbi-fetch-exonsets [d6b36293c2a1]
- added seqinfo and exonset tools [7a75302621d4]
- use transcript hash as PK [9a37befc7519]
- moved bin/* to sbin/ for consolidation [5c439b96e155]
- added colorized logging [f57de62adec4]
- merged grand-reorg branch [b6c407bb9ac9]
- last schema update for reorg [b7b2751fa4e0]
- improved consistency of align/alignment/aln/alt (in favor of alt) and transcript/tx [8c6c1621ca6b]
- schema refactor, again [85a10e9bbd27]
- updated tests; uta.models still failing – will fix after model updates [b3bb51f5ef46]
- dropped engine from cli call signatures (it was redundant) [67ab29f01ab4]
- added uta.connect() function [f0a6bbe31cad]
- removed old test data [a81451e99620]
- eliminated lib/ to structure more a like typical python package [92a8a298c16d]
- full eutils loading worked [91da2fda8369]
- huge loader improvements; more testing needed [9c4de875f047]
- implemented gene loading via eutils [6ab9dfcfb9c8]
- schema updates; improved schema creating handling for postgresql [5bb499e21247]
- implemented gene loading [36116a5a2242]
- updated sqlalchemy database for new schema (DDL check okay!) [211a393586ab]
- #61 - update test target to find tests and run coverage [da94a3188b42]
- updated README with pypi info [7693ea034dfd]
- simple change to trigger dev branch build, maybe [b13f95bf5ebe]
- add link to drone.io test status; upload only bdist_egg and sdist (bdist causes install problems) [5ee38833e845]
0.1.6 (2014-01-03)¶
changes since 0.1.5 (2014-01-03)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- more doc and ci-test fixes [8d6dd89831d9]
0.1.5 (2014-01-03)¶
changes since 0.1.3 (2014-01-03)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- fixed doc building and dropped upload_sphinx (in favor of upload_docs); moved docs to doc/source [4dbc0f653939]
0.1.3 (2014-01-03)¶
changes since 0.1.2 (2013-12-30)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- misc doc updates, incl. version [9f356eb03f8d]
0.1.2 (2013-12-30)¶
changes since 0.1.1 (2013-12-30)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
0.1.1 (2013-12-30)¶
changes since 0.1.0 (2013-12-30)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- updated setup.py “license” attribute [6ef392a5eb58]
- s/locusdevelopment/invitae/ [9aa5579f84cd]
- removed license from ez_setup.py and sphinx_pypi_upload.py [0d922f3819c7]
0.1.0 (2013-12-30)¶
changes since 0.0.3 (2013-10-21)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- added Apache license and code boilerplate to all source files and scripts [3d692ea0d5a2]
- update default host to uta.invitae.com CNAME [605e6e399e5f]
- updated README; added sbin/uta-shell [c3931dda575b]
- #58: migrated uta to publicly-accessible RDS instance and updated uta defaults [d609a81d1ec9]
- updated sbin/uta-pg-to-sqlite to include protein_hash and meta tables [bade1ac7f98c]
- added sbin/fasta-hash-to-tsv [af8cdea82e96]
- updated uta-pg-to-sqlite script to embed version number and name file (name no longer accepted from commandline) [cc8598eeedc8]
- uta-pg-to-sqlite: order records and output loading info [785501f0e8d4]
- use uta0 database by default (rather than reece’s db) [59d60c55cc35]
- #62: synchronized setup files among UTA program components [4319672439a1]
- updated README.rst [a2b81a989aff]
- added jenkins target to makefile [7f509a0b2a0e]
- bring back ez_setup [1b8cec6df88a]
- Makefile: new rule ve-test to execute tests in a fresh ve (as in with jenkins) [779fc64e42d9]
- removed localhost UTA_DB_URL setting in Makefile [e2948fc5577c]
- changed NC_000014.10 to NC_000014.8 [8a0f92bd39ea]
- added get_tx_seq() method [38424d1df2d9]
- removed mapping code that now lives in hgvs [e353859717a1]
- doc/ updates (incomplete) [4323c2a0fec1]
- fetch-tx-* scripts: include gene name in response [c8b55ca6bcf5]
- start feature branch [32732d3ea403]
- fixed start <= end for negative coordinates [432b799d29db]
- corrected NC number for ch14 in genomeutils [e8aea8436a46]
- fixed ci_to_human with additonal logic checks [f547aa8355dc]
- updating intron mapping coordinates [16bcb4919240]
- format edits [bb25bc960fe3]
- tests and bug fixes for offsets and strands [06d5e4a0fcdf]
- transcriptmapper with offsets [4dc927d62610]
- first offset commit [6d7f936c0304]
- updated webservice index.html help [221cbbb5dfec]
- fixed strand bug in webservice api hgvs to genomic coords [d475267ab253]
- Created a web directory and moved the webservice in there for future expansion. Created a help page and additional API call for NM to genomic coords. Restructured the API links and versioned the URLs [6725c420f067]
- added NEFL-dbSNP to the tests [c887969c51a6]
0.0 Series¶
0.0.3 (2013-10-21)¶
changes since 0.0.2 (2013-10-15)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- fixed uta.__version__, I think [71ea26442ebe]
- minor setup.py and Makefile changes; +x on bin/uta-webservice [045b6c412919]
- fixed and commented out DNAH11 tests; see TODO [1b9fe0bd9edb]
- changed logic for db connection info (set UTA_DB_URL=postgresql://localhost/) [ffa815074d8d]
- don’t run test_uta_db_sa_models.py (not ready yet) [8073d4465978]
- added sbin/dbsnp-rs-summary-to-tsv [250fe0dc69df]
- catch errors related to webservice calls [d5675d6acead]
- added uta-webservice and requirements [35b847867c8f]
- added tests for HGVSMapper.hgvsg_to_hgvsc [527cbaf6cd27]
- updated Makefile and setup.py [33b25cca8f3e]
0.0.2 (2013-10-15)¶
changes since 0.0.1 (2013-10-09)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- implemented HGVSMapper.hgvsg_to_hgvsc with tests [a508efd70568]
- update hgvsmapper and add DNAH11 tests [137912d1b76f]
- comment out doctests that require db connection [3441affbcb39]
- raise InvalidIntervalError for intervals outside transcript bounds [6ad61ee30739]
- updated README with installation instructions [482fce4e5917]
- removed stray import IPython [90a5caac6aea]
- changed max_extent default to False; updated TranscriptMapper and tests to use max_extent [a3d0adc5eec7]
- rewrote intervalmapper for min/max extent support, with tests [6e8dc808c42b]
0.0.1 (2013-10-09)¶
changes since 0.0.0 (2013-06-30)
Bug Fixes¶
New Features¶
Changes¶
Security¶
Other Changes¶
- don’t use ez_setup due to setuptools conflicts with other locus projects [43571336cc9e]
- update README with HGVSMapper instructions [95f166a41888]
- specifying hgvs-0.0.2 in dependency_links [aa07e408bdb0]
- testing specifying hgvs-pre in dependency_links [8fcd3a52d92b]
- updated setup.py [e8ea75c7ed49]
- fixed make test [14c04a585bbd]
- incorporated HGVSMapper [ab241c8d090a]
- fixed pkg_dir for sdist [fc92498a6e59]
- reverted assertion [a5cf9207ef3b]
- removed bundled distribute_setup.py [85c8b31997f6]
- removed hgvs dependency; added ez_setup [f0e4942e44d3]
- assertion for start==end==0; doc updates [66088ddbd4be]
- added cds<->ci conversion [e01dbdcb5338]
- added example to README and updated misc/garcia-setup.py [6d5153945396]
- mostly passes John Garcia’s tests [877664636b0e]
- minor commenting and addition of _debug_info in TranscriptMapper [f18ed7daaac2]
- minor doc updates; fixed make test bug [5ab50f868238]
- added support for sphinx_upload [2b5f3204c619]
- fix package_dir settting [daf2c3d8e8ea]
License¶
uta is released under the Apache License 2.0, the text of which appears below:
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.