Custom extensions for pi, a CLI coding agent.
Place these files in ~/.pi/agent/extensions/:
~/.pi/agent/extensions/
| #!/bin/sh | |
| TEMP_BIB_PATH=".mybib.bib" | |
| TEMP_MD_PATH=".mybib.md" | |
| TEMP_CITATION_PATH=".mycitation.md" | |
| clean() { | |
| rm -rf $TEMP_BIB_PATH $TEMP_MD_PATH $TEMP_CITATION_PATH | |
| } |
| """Discover an Eulerian Cycle from a graph.""" | |
| import argparse | |
| from typing import Dict, List | |
| def construct_graph_from_adjacency( | |
| graph_file_path: str, | |
| ) -> Dict[str, List[str]]: | |
| """Construct a graph from an adjacency list in `graph_file_path`. |
| """Discover an Eulerian Path from a graph.""" | |
| import argparse | |
| from collections import Counter | |
| from typing import Dict, List, Optional | |
| def construct_graph_from_adjacency( | |
| graph_file_path: str, | |
| ) -> Dict[str, List[str]]: |
| import random | |
| simulate_deletion_lens = range(30) #deletions to simulate - here, 0 to 30bp deletions. The longer the deletion, the more adapter will be included in the read | |
| simulate_mismatch_counts = range(3) #number of mismatches to simulate - her, 0, 1, and 2 mismatches between r1 and r2. The higher the number of mismatches, the less likely the read will be merged. | |
| read_len = 210 #length of reads to generate | |
| read = ' CGGATGTTCCAATCAGTACGCAGAGAGTCGCCGTCTCCAAGGTGAAAGCGGAAGTAGGGCCTTCGCGCACCTCATGGAATCCCTTCTGCAGCACCTGGATCGCTTTTCCGAGCTTCTGGCGGTCTCAAGCACTACCTACGTCAGCACCTGGGACCCCGCCACCGTGCGCCGGGCCTTGCAGTGGGCGCGCTACCTGCGCCACATCCATCGGCGCTTTGGTCGG ' | |
| readthrough = 'ACACTCTTTCCCTACACGACGCTCTTCCGATCTCGGATGTTCCAATCAGTACGCAGAGAGTCGCCGTCTCCAAGGTGAAAGCGGAAGTAGGGCCTTCGCGCACCTCATGGAATCCCTTCTGCAGCACCTGGATCGCTTTTCCGAGCTTCTGGCGGTCTCAAGCACTACCTACGTCAGCACCTGGGACCCCGCCACCGTGCGCCGGGCCTTGCAGTGGGCGCGCTACCTGCGCCACATCCATCGGCGCTTTGGTCGGAGATCGGAAGAGCACACGTCTGAACTCCAGTC |
| """Report the quantification window indexes used from a CRISPResso run. | |
| The script expects to be adjacent to any number of CRISPResso runs, it will | |
| search among the runs and extract each CRISPResso2_info.json file and print | |
| out the quantification windows for each amplicon. | |
| """ | |
| import glob | |
| import json | |
Custom extensions for pi, a CLI coding agent.
Place these files in ~/.pi/agent/extensions/:
~/.pi/agent/extensions/