Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
drv850 committed Nov 4, 2024
1 parent 14daa72 commit 3e5f720
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions GenNet_utils/Dataloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def multi_genotype_matrix(self, idx):
def get_data(self, sample_pat=0):

genotype_hdf = tables.open_file(self.genotype_path + "/genotype.h5", "r")
ybatch = self.eval_subjects["labels"]


if sample_pat > 0:
self.eval_subjects = self.eval_subjects.sample(n=sample_pat, random_state=1)
Expand All @@ -286,8 +286,10 @@ def get_data(self, sample_pat=0):
xcov = xcov.values
xbatch = genotype_hdf.root.data[xbatchid,...]
xbatch = self.if_one_hot(xbatch)

ybatch = self.eval_subjects["labels"]
ybatch = np.reshape(np.array(ybatch), (-1, 1))
ybatch = ybatch[xbatchid]

genotype_hdf.close()
return [xbatch, xcov], ybatch

Expand Down
1 change: 1 addition & 0 deletions interpretation/NID.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import pandas as pd
import numpy as np
import itertools
import math

from scipy.sparse import coo_matrix

Expand Down

0 comments on commit 3e5f720

Please sign in to comment.