Data Export¶
The data export page is a react app, with the following classes and methods, located at /dcc/dcc/static/js/dataExport.js.
-
heatMapOptions()¶ Create the list of select options used for the y-axis of the heat map based on the key-value pairs in sideBarContent
-
csrfSafeMethod(method)¶ Set up csrf authentication for all ajax calls
-
sortByKey(array, key)¶ Sort an array of objects by a specific key
-
sortByNestedKey(array, keys)¶ Sort an array of objects by a two keys, one nested inside the other
Arguments: - array (array) – a nested array
- keys (string) – two nested keys given as a string separated by a “.”
-
class
FileTable()¶ The overall parent component rendering the data export table view
-
loadTableFromServer()¶ Initial data load from the server and save it in the state (can take a long time)
-
updatePageCount()¶ Update the pagination page count
-
handlePageChange()¶ Update the state for currentPage when the pagination page changes
-
createSeriesElements()¶ Create the SeriesElement components
Returns: array – an array of divs, one div per Series Element
-
clearFilter(category)¶ Remove all or specific filter terms
Arguments: - category (string) – if no category is specified all filters will be removed
-
searchUpdated(term)¶ Filter based on search input field (after more than three characters have been entered)
Arguments: - term (string) – the entered search term
-
deleteItem()¶ Remove selected data item from selection
-
afterSelect()¶ Open drawer after data item was selected
-
selectHeatMapOption()¶ Select the attribute for y-axis in the heatmap
-
filterData()¶ Filter the data based on selected facets and/or entered search terms
-
filterFacet(selectedFacets)¶ Initiate filtering based on selected facets
Arguments: - selectedFacets (object) – An object, where each key correspond to a key in the dataExport.json and the value to a specific value for the given key in the dataExport.json
-
heatMap2SideBar()¶ filter data based on selection of a tile in the heatmap
-
toggleView()¶ toggle between table and heatmap view
-
downloadZip()¶ send a file request to the server to recieve an tar zipped archive for the selected data items
-
downloadURL()¶ create a file called ‘DCC-urls.txt’ with the urls to the selected data items (without contacting the server)
Returns: type – description
-
selectAll()¶ select all (filtered) data items of the table, including those hidden because of pagination
Returns: type – description
-
showTitleOn()¶ display the ids as title for the items
-
showTitleOff()¶ remove the ids as title for the items
-
class
HeatMapSelect()¶ The select field for the y-axis of the heat map
-
class
Facet()¶ The parent facet, which contains a list of facet elements
-
class
FacetElements()¶ The individual elements inside a facet
-
toggleMore()¶ Toggle between shortened and full list
-
handleClick(key, category)¶ Filter by clicked facet element
Arguments: - key (string) – name for the value of the facet element in the dataExport.json
- category (string) – key for the facet element in the dataExport.json
-
class
Biosamples()¶ Card-like element displaying the biosample information. Nested inside it are similar card-like elements for biosample replicate, applied assay, sequencing and data metadata. Uses a specially styled <dl> to show small metadata keys and larger metadata values.