gene2range
Quick Start
- Command:
PATH=/home/vimalinx/miniforge3/envs/bio/bin:$PATH /home/vimalinx/miniforge3/envs/bio/bin/gene2range chr1 < gene_summaries.xml - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/gene2range - Reference: See
references/help.mdfor detailed usage and examples
When To Use This Tool
- Filter
DocumentSummaryXML down to one chromosome with normalizedMin/Maxcoordinates. - Convert Entrez Gene summaries into
GENEXML blocks that downstream helpers such asfind-in-genecan consume. - Preserve strand direction by inferring
plusorminusfromChrStartversusChrStop.
Common Patterns
# 1) Convert chr1 gene summaries into sorted GENE XML
PATH=/home/vimalinx/miniforge3/envs/bio/bin:$PATH \
/home/vimalinx/miniforge3/envs/bio/bin/gene2range chr1 \
< gene_summaries.xml \
> chr1_ranges.xml
# 2) Use directly in a larger Entrez XML pipeline
upstream_gene_summary_command | \
PATH=/home/vimalinx/miniforge3/envs/bio/bin:$PATH \
/home/vimalinx/miniforge3/envs/bio/bin/gene2range chr2
Recommended Workflow
- Start from
DocumentSummaryXML that still containsGenomicInfoTypeblocks. - Pass the target chromosome name as the sole positional argument.
- Capture the emitted
GENEXML and inspect a few records forStrand,Min,Max,Id,Name, andDesc. - Feed that XML into downstream interval helpers only after confirming the chromosome filter behaved as expected.
Guardrails
- The only required positional argument is the chromosome name; the script reads gene summaries from stdin.
- This wrapper depends on sibling EDirect tools (
xtract,sort-table,tbl2xml), so absolute-path invocation alone can still fail if the bio / EDirect bin directory is missing fromPATH. - Output is XML, not a plain TSV coordinate table.
- Strand is inferred by comparing
ChrStartandChrStop; reversed genomic coordinates are normalized intoMin/MaxwithStrand=minus.