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 = { ...@@ -52,11 +52,11 @@ type TranscriptInResponse = {
}; };
cds: { cds: {
sequence: Sequence; sequence: Sequence;
}; } | null;
product: { product: {
stable_id: string; stable_id: string;
sequence: Sequence; sequence: Sequence;
}; } | null;
}>; }>;
}; };
...@@ -168,14 +168,18 @@ const processTranscriptData = (transcript: TranscriptInResponse) => { ...@@ -168,14 +168,18 @@ const processTranscriptData = (transcript: TranscriptInResponse) => {
checksum: productGeneratingContext.cdna.sequence.checksum, checksum: productGeneratingContext.cdna.sequence.checksum,
label: `${stable_id} cdna` label: `${stable_id} cdna`
}, },
cds: { cds: productGeneratingContext.cds
? {
checksum: productGeneratingContext.cds.sequence.checksum, checksum: productGeneratingContext.cds.sequence.checksum,
label: `${stable_id} cds` label: `${stable_id} cds`
}, }
protein: { : undefined,
protein: productGeneratingContext.product
? {
checksum: productGeneratingContext.product.sequence.checksum, checksum: productGeneratingContext.product.sequence.checksum,
label: `${productGeneratingContext.product.stable_id} pep` label: `${productGeneratingContext.product.stable_id} pep`
} }
: undefined
}; };
}; };
......
...@@ -98,7 +98,7 @@ export const filterTranscriptOptions = ( ...@@ -98,7 +98,7 @@ export const filterTranscriptOptions = (
): Partial<TranscriptOptions> => { ): Partial<TranscriptOptions> => {
return biotype === 'protein_coding' return biotype === 'protein_coding'
? defaultTranscriptOptions ? defaultTranscriptOptions
: pick(defaultTranscriptOptions, ['genomicSequence']); : pick(defaultTranscriptOptions, ['genomicSequence', 'cdna']);
}; };
const InstantDownloadTranscript = (props: Props) => { const InstantDownloadTranscript = (props: Props) => {
...@@ -118,7 +118,7 @@ const InstantDownloadTranscript = (props: Props) => { ...@@ -118,7 +118,7 @@ const InstantDownloadTranscript = (props: Props) => {
const resetCheckboxes = () => { const resetCheckboxes = () => {
setIsGeneSequenceSelected(false); setIsGeneSequenceSelected(false);
setTranscriptOptions(defaultTranscriptOptions); setTranscriptOptions(filterTranscriptOptions(biotype));
}; };
const onSubmit = async () => { 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