Skip to content

Commit

Permalink
Merge pull request #53 from daisybio/decending_bug
Browse files Browse the repository at this point in the history
bug fix readceRNATranscripts sorting
  • Loading branch information
strasserle authored Dec 20, 2024
2 parents c118fa9 + f464ac0 commit c1856da
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/controllers/transcriptInteraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,21 +285,21 @@ def read_all_transcript_network_analysis(dataset_ID: int = None, disease_name=No
# add all sorting if given:
sort = [models.networkAnalysisTranscript.sponge_run_ID]
if sorting is not None:
if sort == "betweenness":
if sorting == "betweenness":
if descending:
sort.append(models.networkAnalysisTranscript.betweenness.desc())
else:
sort.append(models.networkAnalysisTranscript.betweenness.asc())
if sort == "degree":
if descending:
sort.append(models.networkAnalysisTranscript.node_degree.desc())
else:
sort.append(models.networkAnalysisTranscript.node_degree.asc())
if sort == "eigenvector":
if descending:
sort.append(models.networkAnalysisTranscript.eigenvector.desc())
else:
sort.append(models.networkAnalysisTranscript.eigenvector.asc())
if sorting == "degree":
if descending:
sort.append(models.networkAnalysisTranscript.node_degree.desc())
else:
sort.append(models.networkAnalysisTranscript.node_degree.asc())
if sorting == "eigenvector":
if descending:
sort.append(models.networkAnalysisTranscript.eigenvector.desc())
else:
sort.append(models.networkAnalysisTranscript.eigenvector.asc())

result = models.networkAnalysisTranscript.query \
.join(models.Transcript, models.Transcript.transcript_ID == models.networkAnalysisTranscript.transcript_ID) \
Expand Down

0 comments on commit c1856da

Please sign in to comment.