# seq_tools
[![PYPI package](https://badge.fury.io/py/rna_seq_tools.png)](http://badge.fury.io/py/rna_seq_tools)
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
[![formatting: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
a short python tool for working with sequences in dataframes
## how to install
```shell
pip install rna_seq_tools
```
## how to use
`seq_tools` is a python package that contains a few functions for working with sequences in
dataframes. If there is a single sequence results are printed. If input is a csv then a new csv is
created with the results. Default output is "output.csv" but can be changed with the `-o` flag.
```shell
$ seq_tools --help
Usage: seq_tools [OPTIONS] COMMAND [ARGS]...
a set scripts to manipulate sequences in csv files
Options:
--help Show this message and exit.
Commands:
add add a sequence to 5' and/or 3'
ec calculate the extinction coefficient for each sequence
edit-distance calculate the edit distance of a library
fold fold rna sequences
mw calculate the molecular weight for each sequence
rc calculate reverse complement for each sequence
to-dna convert rna sequence(s) to dna
to-dna-template convert rna sequence(s) to dna template, includes T7...
to-fasta generate fasta file from csv
to-opool generate oligo pool file from csv
to-rna convert rna sequence(s) to dna
transcribe convert dna sequence(s) to rna
trim trim 5'/3' ends of sequences
```
### add
Adds a sequence to the 5' and/or 3' end of a sequence.
```shell
$ seq_tools add -p5 "AAAA" "GGGGUUUUCCCC"
SEQ_TOOLS.get_input_dataframe - INFO - reading sequence GGGGUUUUCCCC
SEQ_TOOLS.handle_output - INFO - output->
name seq
sequence AAAAGGGGUUUUCCCC
Name: 0, dtype: object
```
### ec
Calculate the extinction coefficient for each sequence.
```shell
$ seq-tools ec "GGGGUUUUCCCC"
SEQ_TOOLS.get_input_dataframe - INFO - reading sequence GGGGUUUUCCCC
SEQ_TOOLS.handle_ntype - INFO - determining nucleic acid type: RNA
SEQ_TOOLS.handle_output - INFO - output->
name seq
sequence GGGGUUUUCCCC
extinction_coeff 109500
Name: 0, dtype: object
```
### edit-distance
Calculate the edit distance of a library. On average how different each sequence
is from the rest of the library.
```shell
seq-tools edit-distance test/resources/test.csv
SEQ_TOOLS.edit_distance - INFO - edit distance: 17.666666666666668
```
### fold
Fold rna sequences.
```shell
$ seq-tools fold "GGGGUUUUCCCC"
SEQ_TOOLS.get_input_dataframe - INFO - reading sequence GGGGUUUUCCCC
SEQ_TOOLS.handle_output - INFO - output->
name seq
sequence GGGGUUUUCCCC
structure ((((....))))
mfe -5.9
ens_defect 0.38
Name: 0, dtype: object
```
### to-dna
Convert all sequences to DNA i.e. replace T with U.
```shell
$ seq_tools to-dna "GGGGUUUUCCCC"
SEQ_TOOLS.get_input_dataframe - INFO - reading sequence GGGGUUUUCCCC
SEQ_TOOLS.to_dna - INFO - converted sequence: GGGGTTTTCCCC
```
### other non commandline
#### structure representation
```python
from seq_tools import SequenceStructure
struct = SequenceStructure("GGGGUUUUCCCC", "((((....))))")
```
Raw data
{
"_id": null,
"home_page": "https://github.com/jyesselm/seq_tools",
"name": "rna-seq-tools",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "seq_tools",
"author": "Joe Yesselman",
"author_email": "jyesselm@unl.edu",
"download_url": "https://files.pythonhosted.org/packages/e6/38/5f2491106012251584cc4ec75a6e09a34d923bccbb1d143b58fd62b243e2/rna_seq_tools-0.7.1.tar.gz",
"platform": null,
"description": "# seq_tools\n\n[![PYPI package](https://badge.fury.io/py/rna_seq_tools.png)](http://badge.fury.io/py/rna_seq_tools)\n[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)\n[![formatting: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\na short python tool for working with sequences in dataframes\n\n## how to install\n\n```shell\npip install rna_seq_tools\n```\n\n## how to use\n\n`seq_tools` is a python package that contains a few functions for working with sequences in\ndataframes. If there is a single sequence results are printed. If input is a csv then a new csv is\ncreated with the results. Default output is \"output.csv\" but can be changed with the `-o` flag.\n\n```shell\n$ seq_tools --help\nUsage: seq_tools [OPTIONS] COMMAND [ARGS]...\n\n a set scripts to manipulate sequences in csv files\n\nOptions:\n --help Show this message and exit.\n\nCommands:\n add add a sequence to 5' and/or 3'\n ec calculate the extinction coefficient for each sequence\n edit-distance calculate the edit distance of a library\n fold fold rna sequences\n mw calculate the molecular weight for each sequence\n rc calculate reverse complement for each sequence\n to-dna convert rna sequence(s) to dna\n to-dna-template convert rna sequence(s) to dna template, includes T7...\n to-fasta generate fasta file from csv\n to-opool generate oligo pool file from csv\n to-rna convert rna sequence(s) to dna\n transcribe convert dna sequence(s) to rna\n trim trim 5'/3' ends of sequences\n\n```\n\n### add\nAdds a sequence to the 5' and/or 3' end of a sequence. \n```shell\n$ seq_tools add -p5 \"AAAA\" \"GGGGUUUUCCCC\"\nSEQ_TOOLS.get_input_dataframe - INFO - reading sequence GGGGUUUUCCCC\nSEQ_TOOLS.handle_output - INFO - output->\nname seq\nsequence AAAAGGGGUUUUCCCC\nName: 0, dtype: object\n```\n\n### ec \nCalculate the extinction coefficient for each sequence. \n```shell\n$ seq-tools ec \"GGGGUUUUCCCC\"\nSEQ_TOOLS.get_input_dataframe - INFO - reading sequence GGGGUUUUCCCC\nSEQ_TOOLS.handle_ntype - INFO - determining nucleic acid type: RNA\nSEQ_TOOLS.handle_output - INFO - output->\nname seq\nsequence GGGGUUUUCCCC\nextinction_coeff 109500\nName: 0, dtype: object\n```\n\n### edit-distance\nCalculate the edit distance of a library. On average how different each sequence \nis from the rest of the library. \n```shell\nseq-tools edit-distance test/resources/test.csv\nSEQ_TOOLS.edit_distance - INFO - edit distance: 17.666666666666668\n```\n\n### fold\nFold rna sequences. \n```shell\n$ seq-tools fold \"GGGGUUUUCCCC\"\nSEQ_TOOLS.get_input_dataframe - INFO - reading sequence GGGGUUUUCCCC\nSEQ_TOOLS.handle_output - INFO - output->\nname seq\nsequence GGGGUUUUCCCC\nstructure ((((....))))\nmfe -5.9\nens_defect 0.38\nName: 0, dtype: object\n```\n\n### to-dna\nConvert all sequences to DNA i.e. replace T with U. \n```shell\n$ seq_tools to-dna \"GGGGUUUUCCCC\"\nSEQ_TOOLS.get_input_dataframe - INFO - reading sequence GGGGUUUUCCCC\nSEQ_TOOLS.to_dna - INFO - converted sequence: GGGGTTTTCCCC\n```\n\n### other non commandline\n\n#### structure representation\n\n```python\nfrom seq_tools import SequenceStructure\nstruct = SequenceStructure(\"GGGGUUUUCCCC\", \"((((....))))\")\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "simple functions for manipulating sequences and secondary structures in pandas dataframe format",
"version": "0.7.1",
"split_keywords": [
"seq_tools"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "67cc1ac1f9e7312a434f609bac0afcda754e598f5d4c742d3ee74a661d2c676d",
"md5": "4556b82a7765276454b99f3a1c3cb8e1",
"sha256": "59da280274fa37e505f6a798cf2228f19d78946eb9624041b513267b495b2c6e"
},
"downloads": -1,
"filename": "rna_seq_tools-0.7.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "4556b82a7765276454b99f3a1c3cb8e1",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 13688,
"upload_time": "2023-03-18T11:33:13",
"upload_time_iso_8601": "2023-03-18T11:33:13.154735Z",
"url": "https://files.pythonhosted.org/packages/67/cc/1ac1f9e7312a434f609bac0afcda754e598f5d4c742d3ee74a661d2c676d/rna_seq_tools-0.7.1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e6385f2491106012251584cc4ec75a6e09a34d923bccbb1d143b58fd62b243e2",
"md5": "263b00968ed6dd3da70796be1ebc046f",
"sha256": "db49e852310e4d51c62f585d828788913734f00f3ca819b44179eb6c36b4e4db"
},
"downloads": -1,
"filename": "rna_seq_tools-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "263b00968ed6dd3da70796be1ebc046f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15788,
"upload_time": "2023-03-18T11:33:15",
"upload_time_iso_8601": "2023-03-18T11:33:15.044657Z",
"url": "https://files.pythonhosted.org/packages/e6/38/5f2491106012251584cc4ec75a6e09a34d923bccbb1d143b58fd62b243e2/rna_seq_tools-0.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-18 11:33:15",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "jyesselm",
"github_project": "seq_tools",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "wheel",
"specs": [
[
">=",
"0.22"
]
]
},
{
"name": "black",
"specs": []
},
{
"name": "click",
"specs": []
},
{
"name": "editdistance",
"specs": []
},
{
"name": "tabulate",
"specs": []
},
{
"name": "numpy",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "pytest",
"specs": []
},
{
"name": "vienna",
"specs": []
}
],
"tox": true,
"lcname": "rna-seq-tools"
}