Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
from copy import deepcopy
from kipoi.metadata import GenomicRanges
from kipoi.data import Dataset, kipoi_dataloader
from kipoi_conda.dependencies import Dependencies
from kipoiseq.transforms import ReorderedOneHot
from kipoi.specs import Author
from kipoi_utils.utils import default_kwargs
from kipoiseq.extractors import FastaStringExtractor
from kipoiseq.transforms.functional import resize_interval
from kipoiseq.utils import to_scalar, parse_dtype
# general dependencies
# bioconda::genomelake', TODO - add genomelake again once it gets released with pyfaidx to bioconda
deps = Dependencies(conda=['bioconda::pybedtools', 'bioconda::pyfaidx', 'numpy', 'pandas'],
pip=['kipoiseq'])
package_authors = [Author(name='Ziga Avsec', github='avsecz'),
Author(name='Roman Kreuzhuber', github='krrome')]
# Object exported on import *
__all__ = ['SeqIntervalDl', 'StringSeqIntervalDl', 'BedDataset']
class BedDataset(object):
"""Reads a tsv file in the following format:
```
chr start stop task1 task2 ...
```
# Arguments
tsv_file: tsv file type
bed_columns: number of columns corresponding to the bed file. All the columns
after that will be parsed as targets
from kipoi.data import Dataset, kipoi_dataloader
from kipoi.metadata import GenomicRanges
from kipoi.specs import Author, Dependencies
from kipoi.data import SampleIterator
import gffutils
from pyfaidx import Fasta
import pickle
# general dependencies
# bioconda::genomelake', TODO - add genomelake again once it gets released with pyfaidx to bioconda
deps = Dependencies(conda=['bioconda::pyfaidx', 'numpy', 'pandas'],
pip=['kipoiseq', 'kipoi'])
package_authors = [Author(name='Jun Cheng', github='s6juncheng')]
__all__ = ['ExonInterval', 'generate_exons', 'MMSpliceDl']
# python 2.7 compatibility
try:
FileNotFoundError
except NameError:
FileNotFoundError = IOError
try:
ModuleNotFoundError
except NameError:
ModuleNotFoundError = ImportError