Unverified Commit 8c8271e0 authored by Ridwan Amode's avatar Ridwan Amode Committed by GitHub
Browse files

Enable download of cDNA sequences for non-coding transcripts (#554)

parent 7832200c
Pipeline #186058 passed with stages
in 4 minutes and 50 seconds
......@@ -52,11 +52,11 @@ type TranscriptInResponse = {
};
cds: {
sequence: Sequence;
};
} | null;
product: {
stable_id: string;
sequence: Sequence;
};
} | null;
}>;
};
......@@ -168,14 +168,18 @@ const processTranscriptData = (transcript: TranscriptInResponse) => {
checksum: productGeneratingContext.cdna.sequence.checksum,
label: `${stable_id} cdna`
},
cds: {
checksum: productGeneratingContext.cds.sequence.checksum,
label: `${stable_id} cds`
},
protein: {
checksum: productGeneratingContext.product.sequence.checksum,
label: `${productGeneratingContext.product.stable_id} pep`
}
cds: productGeneratingContext.cds
? {
checksum: productGeneratingContext.cds.sequence.checksum,
label: `${stable_id} cds`
}
: undefined,
protein: productGeneratingContext.product
? {
checksum: productGeneratingContext.product.sequence.checksum,
label: `${productGeneratingContext.product.stable_id} pep`
}
: undefined
};
};
......
......@@ -98,7 +98,7 @@ export const filterTranscriptOptions = (
): Partial<TranscriptOptions> => {
return biotype === 'protein_coding'
? defaultTranscriptOptions
: pick(defaultTranscriptOptions, ['genomicSequence']);
: pick(defaultTranscriptOptions, ['genomicSequence', 'cdna']);
};
const InstantDownloadTranscript = (props: Props) => {
......@@ -118,7 +118,7 @@ const InstantDownloadTranscript = (props: Props) => {
const resetCheckboxes = () => {
setIsGeneSequenceSelected(false);
setTranscriptOptions(defaultTranscriptOptions);
setTranscriptOptions(filterTranscriptOptions(biotype));
};
const onSubmit = async () => {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment