1868550f1b5db4294f65ad06cc657f76f8b0f96c,rnaseq/src/combine_GCTs.py,,,#,8

Before Change


gct_df = pd.concat(gct_df, axis=1)

// sort columns by sample_id
gct_df = gct_df[["Description"] + sorted(gct_df.columns[1:])]

with gzip.open(os.path.join(args.output_dir, args.output_prefix+".gct.gz"), "wt") as f:
    f.write("/Ǘ.2\n")
    f.write("{0:d}\t{1:d}\n".format(gct_df.shape[0], gct_df.shape[1]-1))

After Change



if len(args.input_files)==1 and ".gct" not in args.input_files[0]:
    with open(args.input_files[0]) as f:
        paths = f.read().strip().split("\n")
else:
    paths = args.input_files

sample_ids = np.array([os.path.split(i)[1].split(".")[0] for i in paths])
i = np.argsort(sample_ids)
sample_ids = sample_ids[i]
paths = np.array(paths)[i]

// sort by sample_id
gct_df = [pd.read_csv(paths[0], sep="\t", skiprows=3, header=None, index_col=0, names=["Name","Description", sample_ids[0]])]
gct_df += [pd.read_csv(i, sep="\t", skiprows=3, header=None, usecols=[0,2], index_col=0, names=["Name","Description",j]) for i,j in zip(paths[1:], sample_ids[1:])]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: broadinstitute/gtex-pipeline
Commit Name: 1868550f1b5db4294f65ad06cc657f76f8b0f96c
Time: 2017-05-15
Author: francois@broadinstitute.org
File Name: rnaseq/src/combine_GCTs.py
Class Name:
Method Name:


Project Name: deepfakes/faceswap
Commit Name: d2dbd440d89d22b4b75f30ddeb4c4ebd3882ecfa
Time: 2019-05-14
Author: 36920800+torzdf@users.noreply.github.com
File Name: tools/sort.py
Class Name: Sort
Method Name: sort_face_dissim


Project Name: rtavenar/tslearn
Commit Name: 6ffdbc8963b6bcaf686af1a9d5b7ddf212dbfc31
Time: 2020-04-21
Author: romain.tavenard@univ-rennes2.fr
File Name: tslearn/early_classification.py
Class Name: NonMyopicEarlyClassification
Method Name: fit