Skip to content
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

Small fixes to plotting funcs, for notebook reproducibility #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions source/Main.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ def print(self):
self.landscape_obj.plot_alignment_landscape()

def plotTimeSeries(self, refQueryAlignerObj, plot_cells = False, plot_mean_trend= False):
sb.scatterplot(self.S.X, self.S.Y, color = 'forestgreen' ,alpha=0.05)#, label='Ref')
sb.scatterplot(self.T.X, self.T.Y, color = 'midnightblue' ,alpha=0.05)#, label ='Query')
sb.scatterplot(x=self.S.X, y=self.S.Y, color = 'forestgreen' ,alpha=0.05)#, label='Ref')
sb.scatterplot(x=self.T.X, y=self.T.Y, color = 'midnightblue' ,alpha=0.05)#, label ='Query')
# plt.legend(loc='upper left')
if(plot_cells):
sb.scatterplot(refQueryAlignerObj.ref_time, np.asarray(refQueryAlignerObj.ref_mat[self.gene]), color = 'forestgreen' )
sb.scatterplot(refQueryAlignerObj.query_time, np.asarray(refQueryAlignerObj.query_mat[self.gene]), color = 'midnightblue' )
sb.scatterplot(x=refQueryAlignerObj.ref_time, y=np.asarray(refQueryAlignerObj.ref_mat[self.gene]), color = 'forestgreen' )
sb.scatterplot(x=refQueryAlignerObj.query_time, y=np.asarray(refQueryAlignerObj.query_mat[self.gene]), color = 'midnightblue' )
plt.title(self.gene)
plt.xlabel('pseudotime')
plt.ylabel('log1p expression')
Expand All @@ -79,8 +79,8 @@ def plotTimeSeries(self, refQueryAlignerObj, plot_cells = False, plot_mean_trend
self.plot_mean_trends()

def plotTimeSeriesAlignment(self):
sb.scatterplot(self.S.X, self.S.Y, color = 'forestgreen' ,alpha=0.05)#, label='Ref')
sb.scatterplot(self.T.X, self.T.Y, color = 'midnightblue' ,alpha=0.05)#, label ='Query')
sb.scatterplot(x=self.S.X, y=self.S.Y, color = 'forestgreen' ,alpha=0.05)#, label='Ref')
sb.scatterplot(x=self.T.X, y=self.T.Y, color = 'midnightblue' ,alpha=0.05)#, label ='Query')
# plt.legend(loc='upper left')
self.plot_mean_trends()
plt.title(self.gene)
Expand Down
2 changes: 1 addition & 1 deletion source/TimeSeriesPreprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, time_points, mean_trend, std_trend, data_bins, X,Y, cell_dens
self.intpl_stds = None

def plot_mean_trend(self, color='blue'):
sb.lineplot(self.time_points, self.mean_trend, linewidth=3, color=color)
sb.lineplot(x=self.time_points, y=self.mean_trend, linewidth=3, color=color)


def reverse_time_series(self):
Expand Down