Preprocessing module
downloads_panglao()
Downloads metadata from PanglaoDB
Gets the unique values of metadata entities and writes those to text files.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_urls |
dict(list
|
A dictionary with the urls of each metadata file. |
required |
Returns:
Name | Type | Description |
---|---|---|
tuple |
A tuple containing the DataFrames tissues, genes, cells_organs_germlayers and cells_w_descriptions. |
Source code in wikidata_panglaodb/pre.py
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
reconcile_more_types()
Reconcile dataframe column against one type QID or more
This functions loops through all qids given in the type_qids list and reconciles the pandas column to them, returning a concatenated dataframe with all the matches.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
dataframe_column |
Series
|
A pandas dataframe column with the values to reconcile. |
required |
type_qids |
list
|
A list of the QIDs value you want to reconcile against. |
required |
Returns:
Name | Type | Description |
---|---|---|
DataFrame |
A dataframe containing all possible matches for each item type. |
Source code in wikidata_panglaodb/pre.py
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|