Background
PR #851 successfully added support for all 13 nucleotideSequence.* filter parameters to occ_search() and occ_count() functions. However, occ_download() uses a different mechanism (predicate-based downloads via the GBIF download API) and does not yet support these filters.
Current Status
✅ Supported in:
occ_search() - uses GET /occurrence/search
occ_count() - wraps occ_search()
❌ Not yet supported in:
occ_download() - uses POST /occurrence/download/request with predicate JSON
Requested Feature
Add support for the following nucleotideSequence filters in the download predicate DSL:
nucleotideSequence.nucleotideSequenceID (string)
nucleotideSequence.targetGene (string) - vocabulary reference
nucleotideSequence.sequence (string)
nucleotideSequence.sequenceLength (numeric/range)
nucleotideSequence.gcContent (numeric/range)
nucleotideSequence.nonIupacFraction (numeric/range)
nucleotideSequence.nonACGTNFraction (numeric/range)
nucleotideSequence.nFraction (numeric/range)
nucleotideSequence.nRunsCapped (numeric/range)
nucleotideSequence.naturalLanguageDetected (boolean)
nucleotideSequence.endsTrimmed (boolean)
nucleotideSequence.gapsOrWhitespaceRemoved (boolean)
nucleotideSequence.invalid (boolean)
isSequenced (boolean)
Implementation Requirements
-
Predicate DSL Updates (R/download_predicate_dsl.r):
- Add nucleotideSequence parameters to allowed predicate keys
- Ensure proper handling of dot notation in parameter names
- Support appropriate operators for each parameter type (equals, range, boolean)
-
Examples:
# Download all ITS1 sequences
occ_download(pred("nucleotideSequence.targetGene", "ITS1"))
# Download sequences with specific GC content range
occ_download(
pred("nucleotideSequence.targetGene", "COI"),
pred_gte("nucleotideSequence.gcContent", 0.4),
pred_lte("nucleotideSequence.gcContent", 0.6)
)
# Download valid sequences only
occ_download(pred("nucleotideSequence.invalid", FALSE))
# Complex query combining taxonomy and sequence filters
occ_download(
pred("taxonKey", 212), # Aves
pred("nucleotideSequence.targetGene", "COI"),
pred_gte("nucleotideSequence.sequenceLength", 500),
pred("nucleotideSequence.invalid", FALSE)
)
Background
PR #851 successfully added support for all 13
nucleotideSequence.*filter parameters toocc_search()andocc_count()functions. However,occ_download()uses a different mechanism (predicate-based downloads via the GBIF download API) and does not yet support these filters.Current Status
✅ Supported in:
occ_search()- uses GET/occurrence/searchocc_count()- wrapsocc_search()❌ Not yet supported in:
occ_download()- uses POST/occurrence/download/requestwith predicate JSONRequested Feature
Add support for the following nucleotideSequence filters in the download predicate DSL:
nucleotideSequence.nucleotideSequenceID(string)nucleotideSequence.targetGene(string) - vocabulary referencenucleotideSequence.sequence(string)nucleotideSequence.sequenceLength(numeric/range)nucleotideSequence.gcContent(numeric/range)nucleotideSequence.nonIupacFraction(numeric/range)nucleotideSequence.nonACGTNFraction(numeric/range)nucleotideSequence.nFraction(numeric/range)nucleotideSequence.nRunsCapped(numeric/range)nucleotideSequence.naturalLanguageDetected(boolean)nucleotideSequence.endsTrimmed(boolean)nucleotideSequence.gapsOrWhitespaceRemoved(boolean)nucleotideSequence.invalid(boolean)isSequenced(boolean)Implementation Requirements
Predicate DSL Updates (
R/download_predicate_dsl.r):Examples: