Skip to content

Commit

Permalink
Userdatasets rnaseq fixes (#1121)
Browse files Browse the repository at this point in the history
* Only show genome browser track links for bigwig files

* Do not run search if no genome is found

* Update comment and add project check
  • Loading branch information
dmfalke authored Jul 10, 2024
1 parent 4496e80 commit 863090a
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,15 @@ class BigwigDatasetDetail extends UserDatasetDetail {
}

componentDidMount() {
const { userDataset } = this.props;
const {
userDataset,
config: { projectId },
} = this.props;
const { wdkService } = this.context;
const { dependencies } = userDataset;
if (!userDataset.projects.includes(projectId)) return;
let genome;
// There will only ever be one such dependency in this array
dependencies.forEach(function (dependency) {
if (dependency.resourceIdentifier.endsWith('_Genome')) {
const regex = new RegExp(
Expand All @@ -34,6 +39,7 @@ class BigwigDatasetDetail extends UserDatasetDetail {
genome = genomeList[1];
}
});
if (genome == null) return;
wdkService
.getAnswerJson(
{
Expand Down Expand Up @@ -93,9 +99,11 @@ class BigwigDatasetDetail extends UserDatasetDetail {
renderTracksSection() {
const { userDataset, appUrl, projectName, config, fileListing } =
this.props;
const installFiles = fileListing.install?.contents?.map((file) => ({
dataFileName: file.fileName,
}));
const installFiles = fileListing.install?.contents
?.filter((file) => file.fileName.endsWith('.bw'))
.map((file) => ({
dataFileName: file.fileName,
}));
const { status } = userDataset;

const rows =
Expand Down

0 comments on commit 863090a

Please sign in to comment.