Skip to content

Commit 64abb05

Browse files
committed
Merge master into improve-sample-metadata-docs, keep detailed docs and add notes on lab cross samples
1 parent c909d4e commit 64abb05

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

malariagen_data/anoph/sample_metadata.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,17 @@ def clear_extra_metadata(self):
799799
requested. The returned DataFrame is a copy and can be safely modified
800800
without affecting internal caches.
801801
""",
802+
notes="""
803+
Some samples in the dataset are lab crosses — mosquitoes bred in
804+
the laboratory that have no real collection date. These samples
805+
use ``year=-1`` and ``month=-1`` as sentinel values. They may
806+
cause unexpected results in date-based analyses (e.g.,
807+
``pd.to_datetime`` will fail on negative year values).
808+
809+
To exclude lab cross samples, use::
810+
811+
df = api.sample_metadata(sample_query="year >= 0")
812+
""",
802813
)
803814
def sample_metadata(
804815
self,

0 commit comments

Comments
 (0)