A package to automatically access the inverted repeats of archived plastid genomes
Project description
airpg: Accessing the inverted repeats of archived plastid genomes
A Python package for automatically accessing the inverted repeats of thousands of plastid genomes stored on NCBI Nucleotide
INSTALLATION
To get the most recent stable version of airpg, run:
pip install airpg
Or, alternatively, if you want to get the latest development version of airpg, run:
pip install git+https://github.com/michaelgruenstaeudl/airpg.git
EXAMPLE USAGE
Short survey for the impatient / for testing (runtime ca. 15 min.)
Survey of all plastid genomes of flowering plants submitted to NCBI Nucleotide within the current month.
airpg_identify.py -q "complete genome[TITLE] AND \
(chloroplast[TITLE] OR plastid[TITLE]) AND \
$(date +%Y/%m/01):$(date +%Y/%m/%d)[PDAT] AND \
50000:250000[SLEN] NOT unverified[TITLE] \
NOT partial[TITLE] AND Magnoliophyta[ORGN]" \
-o output_script1.tsv # &> output_script1.log
airpg_analyze.py -i output_script1.tsv \
-m john.smith@example.com -o output_script2.tsv \
# &> output_script2.log
Medium survey (runtime ca. 5 hours)
Survey of all plastid genomes of flowering plants submitted to NCBI Nucleotide in 2019 only. Note: The results of this survey are available on Zenodo via DOI 10.5281/zenodo.4335906
airpg_update_blocklist.py -f airpg_blocklist.txt \
-m john.smith@example.com -q "inverted[TITLE] AND \
repeat[TITLE] AND loss[TITLE]"
airpg_identify.py -q "complete genome[TITLE] AND \
(chloroplast[TITLE] OR plastid[TITLE]) AND \
2019/01/01:2019/12/31[PDAT] AND 50000:250000[SLEN] \
NOT unverified[TITLE] NOT partial[TITLE] AND \
Magnoliophyta[ORGN]" \
-b airpg_blocklist.txt -o output_script1.tsv
airpg_analyze.py -i output_script1.tsv \
-m john.smith@example.com -o output_script2.tsv
Full survey with explanations (runtime ca. 19 hours)
Survey of all plastid genomes of flowering plants submitted to NCBI Nucleotide from start of 2000 until end of October 2020. Note: The results of this survey are available on Zenodo via DOI 10.5281/zenodo.4335906
STEP 1: Querying NCBI Nucleotide for complete plastid genomes given an Entrez search string
TESTFOLDER=./angiosperms_Start2000toEndOct2020
DATE=$(date '+%Y_%m_%d')
ENTREZSTRING='complete genome[TITLE] AND (chloroplast[TITLE] OR plastid[TITLE]) AND 2000/01/01:2020/10/31[PDAT] AND 50000:250000[SLEN] NOT unverified[TITLE] NOT partial[TITLE] AND Magnoliophyta[ORGN]' # complete plastid genomes of all flowering plants between start of 2000 and end of October 2020
RECORDSTABLE=plastome_availability_table_${DATE}.tsv
mkdir -p $TESTFOLDER
# Updating blocklist
if [ ! -f ./airpg_blocklist.txt ]; then
touch ./airpg_blocklist.txt
airpg_update_blocklist.py -f ./airpg_blocklist.txt
fi
airpg_update_blocklist.py -f ./airpg_blocklist.txt -m john.smith@example.com -q "inverted[TITLE] AND repeat[TITLE] AND loss[TITLE]"
airpg_identify.py -q "$ENTREZSTRING" -o $TESTFOLDER/$RECORDSTABLE \
--blocklist ./airpg_blocklist.txt 1>>$TESTFOLDER/airpg_identify_${DATE}.runlog 2>&1
STEP 2: Retrieving and parsing the genome records identified in step 1, analyzing the position and length of their IR annotations
IRSTATSTABLE=reported_IR_stats_table_${DATE}.tsv
mkdir -p $TESTFOLDER/records_${DATE}
mkdir -p $TESTFOLDER/data_${DATE}
airpg_analyze.py -i $TESTFOLDER/$RECORDSTABLE \
-r $TESTFOLDER/records_${DATE}/ -d $TESTFOLDER/data_${DATE}/ \
-m john.smith@example.com -o $TESTFOLDER/$IRSTATSTABLE 1>>$TESTFOLDER/airpg_analyze_${DATE}.runlog 2>&1
CHANGELOG
See CHANGELOG.md
for a list of recent changes to the software.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file airpg-1.0.4.tar.gz
.
File metadata
- Download URL: airpg-1.0.4.tar.gz
- Upload date:
- Size: 22.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.25.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87e6caa71a0eeaaa8fe38183b386ed11c7e2bf91597dc0f3b1b727bbc75644e9 |
|
MD5 | e738e740d714527c82f59fe497cf7b3f |
|
BLAKE2b-256 | d37befb0ca1ca03bb022013b578ce80366e40b67426e71c0dfcc0e824dc5ae66 |
File details
Details for the file airpg-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: airpg-1.0.4-py3-none-any.whl
- Upload date:
- Size: 46.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.25.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85dddb8cf7819cdb0dfd99a6b6d869d8f30815689a07d1071929fbb54ed437c4 |
|
MD5 | 7f2c8c35d20f35e56edff4dd9f7532d6 |
|
BLAKE2b-256 | 4c57cd72c9d798e18f22fb4312d85c361c835015daa5543418a2fed1fc23d695 |