-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load_genomedata: responds poorly to invalid syntax [only a track path, instead of (name, path) tuple] #33
Comments
Original comment by Eric Roberts (Bitbucket: ericr86, GitHub: ericr86). Upon some investigation there could be a hidden underyling problem. The fact that 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.The text was updated successfully, but these errors were encountered: