mirror of
https://github.com/K-Dense-AI/scientific-agent-skills.git
synced 2026-12-07 03:54:00 +08:00
- Enhanced AGENTS.md to clarify skill scope and directory structure, providing clearer guidelines for skill creation and updates. - Updated CONTRIBUTING.md to emphasize the separation of tests from skill directories, ensuring better organization and clarity for contributors. - Revised .gitignore to include .pytest_cache, improving project cleanliness. - Adjusted pyproject.toml to configure pytest for better test path management. - Incremented version number in SKILL.md for autoskill to reflect recent updates.
121 lines
3.1 KiB
Markdown
121 lines
3.1 KiB
Markdown
# Common gget Workflows
|
|
|
|
Multi-module pipelines for gene characterization, structural comparison, expression and
|
|
enrichment analysis, disease and drug association, orthology comparison, and reference
|
|
file preparation. See `workflows.md` for extended versions of these pipelines.
|
|
|
|
## Common Workflows
|
|
|
|
### Workflow 1: Gene Discovery to Sequence Analysis
|
|
|
|
Find and analyze genes of interest:
|
|
|
|
```python
|
|
# 1. Search for genes
|
|
results = gget.search(["GABA", "receptor"], species="homo_sapiens")
|
|
|
|
# 2. Get detailed information
|
|
gene_ids = results["ensembl_id"].tolist()
|
|
info = gget.info(gene_ids[:5])
|
|
|
|
# 3. Retrieve sequences
|
|
sequences = gget.seq(gene_ids[:5], translate=True)
|
|
```
|
|
|
|
### Workflow 2: Sequence Alignment and Structure
|
|
|
|
Align sequences and predict structures:
|
|
|
|
```python
|
|
# 1. Align multiple sequences
|
|
alignment = gget.muscle("sequences.fasta")
|
|
|
|
# 2. Find similar sequences
|
|
blast_results = gget.blast(my_sequence, database="swissprot", limit=10)
|
|
|
|
# 3. Predict structure
|
|
structure = gget.alphafold(my_sequence, plot=True)
|
|
|
|
# 4. Find linear motifs
|
|
ortholog_df, regex_df = gget.elm(my_sequence)
|
|
```
|
|
|
|
### Workflow 3: Gene Expression and Enrichment
|
|
|
|
Analyze expression patterns and functional enrichment:
|
|
|
|
```python
|
|
# 1. Get tissue expression
|
|
tissue_expr = gget.archs4("ACE2", which="tissue")
|
|
|
|
# 2. Find correlated genes
|
|
correlated = gget.archs4("ACE2", which="correlation")
|
|
|
|
# 3. Get single-cell data
|
|
adata = gget.cellxgene(gene=["ACE2"], tissue="lung", cell_type="epithelial cell")
|
|
|
|
# 4. Perform enrichment analysis
|
|
gene_list = correlated["gene_symbol"].tolist()[:50]
|
|
enrichment = gget.enrichr(gene_list, database="ontology", plot=True)
|
|
```
|
|
|
|
### Workflow 4: Disease and Drug Analysis
|
|
|
|
Investigate disease associations and therapeutic targets:
|
|
|
|
```python
|
|
# 1. Search for genes
|
|
genes = gget.search(["breast cancer"], species="homo_sapiens")
|
|
|
|
# 2. Get disease associations
|
|
diseases = gget.opentargets("ENSG00000169194", resource="diseases")
|
|
|
|
# 3. Get drug associations
|
|
drugs = gget.opentargets("ENSG00000169194", resource="drugs")
|
|
|
|
# 4. Query cancer genomics data
|
|
study_ids = gget.cbio_search(["breast"])
|
|
gget.cbio_plot(study_ids[:2], ["BRCA1", "BRCA2"], stratification="cancer_type")
|
|
|
|
# 5. Search COSMIC for mutations
|
|
cosmic_results = gget.cosmic("BRCA1", cosmic_tsv_path="cosmic.tsv")
|
|
```
|
|
|
|
### Workflow 5: Comparative Genomics
|
|
|
|
Compare proteins across species:
|
|
|
|
```python
|
|
# 1. Get orthologs
|
|
orthologs = gget.bgee("ENSG00000169194", type="orthologs")
|
|
|
|
# 2. Get sequences for comparison
|
|
human_seq = gget.seq("ENSG00000169194", translate=True)
|
|
mouse_seq = gget.seq("ENSMUSG00000026091", translate=True)
|
|
|
|
# 3. Align sequences
|
|
alignment = gget.muscle([human_seq, mouse_seq])
|
|
|
|
# 4. Compare structures
|
|
human_structure = gget.pdb("7S7U")
|
|
mouse_structure = gget.alphafold(mouse_seq)
|
|
```
|
|
|
|
### Workflow 6: Building Reference Indices
|
|
|
|
Prepare reference data for downstream analysis (e.g., kallisto|bustools):
|
|
|
|
```bash
|
|
# 1. List available species
|
|
gget ref --list_species
|
|
|
|
# 2. Download reference files
|
|
gget ref -w gtf -w cdna -d homo_sapiens
|
|
|
|
# 3. Build kallisto index
|
|
kallisto index -i transcriptome.idx transcriptome.fasta
|
|
|
|
# 4. Download genome for alignment
|
|
gget ref -w dna -d homo_sapiens
|
|
```
|