- Course overview
- Search within this course
- Overview of key IMPC concepts and tools
- Introduction to the Solr API: accessing IMPC data programmatically
- What is Apache Solr?
- Important definitions: query, field, core, document, parameter
- Quiz 2: get yourself familiar with Solr terminology
- What is the difference between an IMPC parameter and a Solr parameter?
- Using simple Solr syntax in your browser
- Output of the simplest request in your browser
- A Python module to access IMPC data: installation and available functions
- Quiz 3: explain Solr request
- Solr query syntax: simplified explanation
- How to use the solr_request function from the impc-api python package
- How to perform a query: q parameter
- Exercise 1: getting familiar with the core
- How to request a limited number of documents: rows parameter
- Exercise 2: requesting three documents
- How to get specific fields: fl parameter
- Exercise 3: selecting specific fields
- Quiz 4: basic Solr parameters
- Downloading data: getting large results efficiently
- How to download large dataset effectively: pagination
- How to download the data: batch_solr_request function
- What formats are available for downloading: wt parameter
- Exercise 8: download the data
- What is the difference: JSON vs CSV
- What you need to keep in mind: query responsibly
- Quiz 6: request only necessary data
- Advanced Solr query techniques: faceting and iterating over entities
- Understanding IMPC data: resources and assistance
- Your feedback
How to handle with null values: exclude empty fields
For different fields, you may encounter null values. When working in Python (NumPy or Pandas), they are represented as NaN in tables. A null value means that there is no data in this field for a given document, or that the field is not defined or not used for that document.
You can filter out null values by applying this range filter that we have seen before: field:[* TO *]. It works for both string and numeric values.
num_found, df = solr_request(
core='statistical-result',
params={
'q': 'effect_size:[* TO *]',
'fl': 'marker_symbol,top_level_mp_term_name,effect_size,p_value',
'rows': 3
}
)
In this example, hits without an effect_size were filtered out.