diff --git a/README.md b/README.md index 6d59701aedbb8a8eb543a4c32fa5f7e8f02c1383..ab8a079453d9aae7210501f8abf1865267f20be0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,33 @@ Tools to design and analyse CRISPRi experiments -## API +## Getting Started + +### Installation + +For the moment, you can install this package only via PyPI + +#### PyPI + +```console +$ pip install crisprbact +$ crisprbact --help +``` + +``` +Usage: crisprbact [OPTIONS] COMMAND [ARGS]... + +Options: + -v, --verbose + --help Show this message and exit. + +Commands: + predict +``` + +### API + +Using this library in your python code. ```python from crisprbact import on_target_predict @@ -14,7 +40,7 @@ for guide_rna in guide_rnas: ``` -outputs : +_output :_ ``` {'target': 'TCATCACGGGCCTTCGCCACGCGCG', 'guide': 'TCATCACGGGCCTTCGCCAC', 'start': 82, 'stop': 102, 'pam': 80, 'ori': '-', 'pred': -0.4719254873780802} @@ -23,9 +49,15 @@ outputs : {'target': 'CCTGATCGGTATTGAACAGCATCTG', 'guide': 'CCTGATCGGTATTGAACAGC', 'start': 29, 'stop': 49, 'pam': 27, 'ori': '-', 'pred': 0.23853258873311955} ``` -## Command-line +### Command-line + +#### Predict guide RNAs activity -### predict guide RNAs activity +Input the sequence of a target gene and this script will output candidate guide RNAs for the S. pyogenes dCas9 with predicted on-target activity. + +```console +$ crisprbact predict --help +``` ``` Usage: crisprbact predict [OPTIONS] COMMAND [ARGS]... @@ -38,32 +70,55 @@ Commands: from-str Outputs candidate guide RNAs for the S. ``` -#### From a string sequence: +##### From a string sequence: + +The target input sequence can be a simple string. + +```console +$ crisprbact predict from-str --help +``` + ``` Usage: crisprbact predict from-str [OPTIONS] [OUTPUT_FILE] Outputs candidate guide RNAs for the S. pyogenes dCas9 with predicted on- target activity from a target gene. - [OUTPUT_FILE] file where the precitions are saved. Default = "stdout" + [OUTPUT_FILE] file where the candidate guide RNAs are saved. Default = + "stdout" Options: -t, --target TEXT [required] --help Show this message and exit. ``` +```console +$ crisprbact predict from-str -t ACCACTGGCGTGCGCGTTACTCATCAGATGCTGTTCAATACCGATCAGGTTATCGAAGTGTTTGTGATTGTTTGCCGCGCGCGTGGCGAAGGCCCGTGATGAAGGAAAAGTTTTGCGCTATGTTGGCAATATTGATGAAG guide-rnas.tsv +``` + +output file `guide-rnas.tsv` : + +No `seq_id` is defined since it is from a simple string. ``` -crisprbact predict from-str -t ACCACTGGCGTGCGCGTTACTCATCAGATGCTGTTCAATACCGATCAGGTTATCGAAGTGTTTGTGATTGTTTGCCGCGCGCGTGGCGAAGGCCCGTGATGAAGGAAAAGTTTTGCGCTATGTTGGCAATATTGATGAAG guide-rnas.tsv +target PAM position prediction seq_id +TCATCACGGGCCTTCGCCACGCGCG 80 -0.4719254873780802 N/A +CATCACGGGCCTTCGCCACGCGCGC 79 1.0491308060379676 N/A +CGCGCGCGGCAAACAATCACAAACA 61 -0.9021152826078697 N/A +CCTGATCGGTATTGAACAGCATCTG 27 0.23853258873311955 N/A ``` -You can pipe the results : +You can also pipe the results : -``` -crisprbact predict from-str -t ACCACTGGCGTGCGCGTTACTCATCAGATGCTGTTCAATACCGATCAGGTTATCGAAGTGTTTGTGATTGTTTGCCGCGCGCGTGGCGAAGGCCCGTGATGAAGGAAAAGTTTTGCGCTATGTTGGCAATATTGATGAAG | tail -n +2 | wc -l +```console +$ crisprbact predict from-str -t ACCACTGGCGTGCGCGTTACTCATCAGATGCTGTTCAATACCGATCAGGTTATCGAAGTGTTTGTGATTGTTTGCCGCGCGCGTGGCGAAGGCCCGTGATGAAGGAAAAGTTTTGCGCTATGTTGGCAATATTGATGAAG | tail -n +2 | wc -l ``` -#### From a sequence file +##### From a sequence file + +```console +$ crisprbact predict from-seq --help +``` ``` Usage: crisprbact predict from-seq [OPTIONS] [OUTPUT_FILE] @@ -71,28 +126,29 @@ Usage: crisprbact predict from-seq [OPTIONS] [OUTPUT_FILE] Outputs candidate guide RNAs for the S. pyogenes dCas9 with predicted on- target activity from a target gene. - [OUTPUT_FILE] file where the precitions are saved. Default = "stdout" + [OUTPUT_FILE] file where the candidate guide RNAs are saved. Default = + "stdout" Options: - -t, --target FILENAME Sequence file [required] - -f, --seq-format TEXT Sequence file format - --help Show this message and exit. - + -t, --target FILENAME Sequence file [required] + -f, --seq-format [fasta|fa|gb|genbank] + Sequence file format [default: fasta] + --help Show this message and exit. ``` -- Fasta file (could be multifasta) +- Fasta file (could be a multifasta file) -``` -poetry run crisprbact predict from-seq -t /tmp/seq.fasta guide-rnas.tsv +```console +$ crisprbact predict from-seq -t /tmp/seq.fasta guide-rnas.tsv ``` - GenBank file -``` -poetry run crisprbact predict from-seq -t /tmp/seq.gb -f gb guide-rnas.tsv +```console +$ crisprbact predict from-seq -t /tmp/seq.gb -f gb guide-rnas.tsv ``` -### Output file +##### Output file ``` target PAM position prediction input_id