Comments (3)
The docs are at https://bx-python.readthedocs.io/ , but that's mostly generated from the method/class docstrings, and species_to_lengths
was not documented there, so thanks @rsharris for digging through the code!
from bx-python.
I don't know whether overall docs exist.
There is some documentation for species_to_lengthS in the code, in lib/bx/align/core.py, in the body of the Alignment class's constructor:
species_to_lengths is needed only for file formats that don't provide chromosome lengths; it maps each species name to one of these:
- the name of a file that contains a list of chromosome length pairs
- a dict mapping chromosome names to their length
- a single length value (useful when we just have one sequence and no chromosomes)
Because of the way axt describes positions for reverse-strand alignments, chromosome lengths are needed.
So, it's a dict that maps each of two species names (only two because axt only supports pairwise alignments) to either a filename or a dict that maps chromosome names to their length. The "single length value" variant can be used if you have an alignment of one sequence to the other and (I suppose) doesn't contain chromosome names (or in which the chromosome name is used instead of a species name).
The format of the "file that contains a list of chromosome length pairs" is described at the top of lib/bx/misc/readlengths/py.
As I recall, there's some assumption about sequence names having the form <species>.<chrom>
.
from bx-python.
There's a 95% chance that species_to_lengths was part of my minor contributions to the package, circa 2005. So I was pretty sure that was documented somewhere, but it did take a little digging to locate it.
from bx-python.
Related Issues (20)
- Extend linting with ruff
- Tests do not run in PEP517 out-of-source build (gentoo) HOT 5
- error can't found bx.intervals module
- get on bx.align.maf.MAFIndexedAccess results in wrong alignment blocks HOT 4
- Importing ABC directly from collections was deprecated and will be removed in Python 3.10. Use collections.abc
- time.clock has been removed in Python 3.8
- ImportError: undefined symbol: PyUnicodeUCS2_FromStringAndSize HOT 1
- binned_bitsets_from_list errors when chromosome size is larger than set MAX (512M) HOT 1
- Got wrong positions on chomped query maf subset HOT 2
- How to dealing with maf files compressed with bzip2 or lzop ? HOT 4
- Failed to load seekbzip2 module when dealing with bz2 files HOT 1
- undefined symbol: PyUnicodeUCS2_FromStringAndSize HOT 3
- 0.8.11 Doesn't install some built shared libraries HOT 8
- Add support to release linux aarch64 wheels HOT 1
- multiple sequence alignment
- upgrading bx-python to newer versions of python HOT 1
- ERROR Missing dependencies: oldest-supported-numpy HOT 2
- Build errors on osx-arm64 (bioconda) HOT 2
- 0.12.0: Fails to build: error: incompatible integer to pointer conversion assigning to 'void **' from 'int' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bx-python.