cBioPortal / cbioportal

cBioPortal for Cancer Genomics
https://cbioportal.org
GNU Affero General Public License v3.0
578 stars 440 forks source link

Clinical Data Table TSV file download is not in TSV format #10831

Open pappde opened 3 weeks ago

pappde commented 3 weeks ago

There is a button in cBioPortal that says "download TSV" but the file you download is actually JSON format, even though it has a TSV extension. This is specific to the "Clinical Data" tab from the study page.

REPRO:

  1. go to any study page
  2. go to the "Clinical Data" tab. E.g. https://www.cbioportal.org/study/clinicalData?id=msk_impact_2017
  3. observe there are two download buttons.
  4. click the first one. It will download "msk_impact_2017_clinical_data.tsv" which is proper TSV format
  5. click the second one. It will download "msk_impact_2017_clinical_data.tsv" but in JSON format (see example below)
[{"studyId":"paac_jhu_2014","patientId":"ACINAR04","sampleId":"ACINAR04", ...

EXPECTED:

  1. the file downloads in TSV format, since that is what the button tooltip and extension indicate.

NOTES: The first button (gives TSV):

<button class="btn btn-default btn-sm" data-event="{&quot;category&quot;:&quot;studyPage&quot;,&quot;action&quot;:&quot;dataDownload&quot;,&quot;label&quot;:&quot;msk_impact_2017,&quot;}"><i class="fa fa-download"></i></button>

The second button (gives JSON, but is named TSV):

<button type="button" class="btn-sm btn btn-default"> <i class="fa fa-cloud-download"></i></button>

The tables in cBioPortal normally download with the name "table.tsv". This is the only table I'm aware of that downloads with the name "(study).tsv". Not sure if that's helpful.