07d2442c2bfe4521b6e88bb63dc484efac9a53e4,cnvlib/tabio/genepred.py,,read_refflat,#Any#Any#Any#,80
Before Change
dframe["start"] = dframe["start"].astype("int") - 1
dframe["end"] = dframe["end"].astype("int")
for key in ("start_cds", "end_cds", "exon_starts", "exon_ends"):
del dframe[key]
// NB: same gene name can appear on alt. contigs
dframe = (dframe.groupby(by=["chromosome", "strand", "gene"],
as_index=False, group_keys=False, sort=False)
.apply(_merge_overlapping))
return dframe.reindex()
After Change
try:
dframe = pd.read_table(infile, header=None,
names=colnames, usecols=usecols,
dtype={c: str for c in cols_shared})
except (pd.parser.CParserError, csv.Error) as err:
raise ValueError("Unexpected dataframe contents:\n%s\n%s" %
(line, next(infile)))
// Calculate values for output columns
if exons:
// TODO -- pandas trickery; then _merge_overlapping
// es = dframe["exon_starts"].str.rstrip(",").str.split(",")
// ee = dframe["exon_ends"].str.rstrip(",").str.split(",")
// exons = list(zip(es, ee))
// dframe.apply,applymap,...
raise NotImplementedError
else:
dframe = dframe.sort_values(["chromosome", "start", "end"])
dframe["start"] -= 1
// NB: same gene name can appear on alt. contigs
dframe = (dframe.groupby(by=["chromosome", "strand", "gene"],
as_index=False, group_keys=False, sort=False)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 7
Instances
Project Name: etal/cnvkit
Commit Name: 07d2442c2bfe4521b6e88bb63dc484efac9a53e4
Time: 2016-10-25
Author: eric.talevich@gmail.com
File Name: cnvlib/tabio/genepred.py
Class Name:
Method Name: read_refflat
Project Name: allenai/allennlp
Commit Name: abfb32dd9303358c670a7567df445de02f560868
Time: 2018-08-24
Author: mattg@allenai.org
File Name: allennlp/nn/decoding/grammar_state.py
Class Name: GrammarState
Method Name: take_action
Project Name: Alexander-H-Liu/End-to-end-ASR-Pytorch
Commit Name: 41a3e20440c61f4892d7731f89032b53932cce66
Time: 2019-08-14
Author: alexliu36@gmail.com
File Name: src/solver.py
Class Name: Solver
Method Name: write_log
Project Name: markovmodel/PyEMMA
Commit Name: 4046c198f9a4a9d209926aa8cabbda0d962f7e7a
Time: 2018-01-09
Author: m.scherer@fu-berlin.de
File Name: pyemma/_base/model.py
Class Name: Model
Method Name: __my_setstate__