Open EricR86 opened 7 years ago
Original comment by Eric Roberts (Bitbucket: ericr86, GitHub: ericr86).
Upon some investigation there could be a hidden underyling problem. The fact that tracks
option is not a tuple does not clearly explain the entire problem.
Notably there is this from the load_seq code which happens before the tracks are parsed. From genomedata/_load_seq.py:243:
warnings.simplefilter("ignore")
with Genome(gdpath, mode="w", filters=FILTERS_GZIP) as genome:
if seqfile_type == "sizes":
for name, size in sizes.items():
chromosome = create_chromosome(genome, name, mode)
size_chromosome(chromosome, size)
else:
assert seqfile_type in frozenset(["agp", "fasta"])
for filename in filenames:
if verbose:
print(filename, file=sys.stderr)
with maybe_gzip_open(filename) as infile:
if seqfile_type == "agp":
name = path(filename).name.rpartition(".agp")[0]
chromosome = create_chromosome(genome, name, mode)
read_assembly(chromosome, infile)
else:
for defline, seq in LightIterator(infile):
chromosome = create_chromosome(genome, defline, mode)
read_seq(chromosome, seq)
# XXX: this should be enforced even when there is an exception
# is there a context manager available?
warnings.resetwarnings()
Original comment by Coby Viner (Bitbucket: cviner2, GitHub: cviner).
It is not public data and is ~ 4 MiB. It is difficult for me to see how it could depend on that particular bedGraph (does any simple bedGraph not reproduce this?). I can give you a copy of it for local testing, if necessary though.
I don't know if this occurs for others, as I only made this mistake the one time, in an interactive session.
Original report (archived issue) by Coby Viner (Bitbucket: cviner2, GitHub: cviner).
load_genomedata
does not fail-fast nor return a clear error message when a track path is directly provided (tracks=['./5xC-sorted.bedGraph.gz']
), as opposed to correctly providing a track name and (file or directory) path as a tuple (tracks=('5xC', './5xC-sorted.bedGraph.gz')
).An invocation of
load_genomedata
that results in this issue is provided below.