Skip to content
Merged
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
14 changes: 14 additions & 0 deletions frontend/src/components/TextTrack.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ chr1 791044 793910 chr8:248210-251154,2 7 .`
"chr5:1270279-1272416<->SV40:5172-5243" TRUE FALSE NA 35 37.2369416773403
"chr8:128109053-128110360<->chr8:129534833-129536039" FALSE FALSE 1425729.5 100 34.8639202860754
"chr20:49345639-49354229<->chr20:50511129-50512012" FALSE FALSE 1161636.5 129 30.5556940820741`
},
callingcard: {
label: 'callingcard',
desc: 'Text file in CCF format, comprising 4-6 columns: chrom, start, end, value; and, optionally, strand and annotation',
example: `chr1 51441754 51441758 1 - CTAGAGACTGGC
chr1 51441754 51441758 21 - CTTTCCTCCCCA
chr1 51982564 51982568 3 + CGCGATCGCGAC
chr1 52196476 52196480 1 + AGAATATCTTCA
chr1 52341019 52341023 1 + TACGAAACACTA
chr1 59951043 59951047 1 + ACAAGACCCCAA
chr1 59951043 59951047 1 + ACAAGAGAGACT
chr1 61106283 61106287 1 - ATGCACTACTTC
chr1 61106283 61106287 7 - CGTTTTTCACCT
chr1 61542006 61542010 1 - CTGAGAGACTGG`
}
};

Expand Down
15 changes: 12 additions & 3 deletions frontend/src/components/trackConfig/CallingCardTrackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { BedWorker } from '../../dataSources/WorkerTSHook';
import LocalBedSource from '../../dataSources/LocalBedSource';
import CallingCard from '../../model/CallingCard';
import BedRecord from '../../dataSources/bed/BedRecord';
import BedTextSource from "../../dataSources/BedTextSource";
import HeightConfig from '../trackContextMenu/HeightConfig';
import YscaleConfig from '../trackContextMenu/YscaleConfig';
import LogScaleConfig from '../trackContextMenu/LogScaleConfig';
Expand All @@ -22,10 +23,18 @@ export class CallingCardTrackConfig extends TrackConfig {
}

initDataSource() {
if (this.trackModel.files.length > 0) {
return new LocalBedSource(this.trackModel.files);
if (this.trackModel.isText) {
return new BedTextSource({
url: this.trackModel.url,
blob: this.trackModel.fileObj,
textConfig: this.trackModel.textConfig
});
} else {
return new WorkerSource(BedWorker, this.trackModel.url);
if (this.trackModel.files.length > 0) {
return new LocalBedSource(this.trackModel.files);
} else {
return new WorkerSource(BedWorker, this.trackModel.url);
}
}
}

Expand Down