Giter Site home page Giter Site logo

gff2mss's Introduction

GFF2MSS: GFF3 converter for DDBJ submission via MSS

====

MSS (Mass Submission System) on DDBJ requires uniq annotation format file for data submission. I here made a python script converting the standard gff3 gene model file to the MSS annotation. This script makes an MSS file from a gff3 file for gene modeling, a tsv file for annotation file, and a fasta file containing genomic sequence. We recommend pre-processing your gff3 data via GFF3sort.pl, before your conversion. After the making of MSS file, you should fill "COMMON" entries (SUBMITTER, REFERENCE, etc.) before the submission for DDBJ. This software is a non-official converter for MSS. We do not guarantee that DDBJ accepts the generated files.

v.4.0

  • Support for ambiguous "N"-base in fasta. ("N/n"-base will be converted to "assembly_gap" feature in MSS). Please install "gffpandas" library.
  • According to the "N"-base supporting, "artificial_location" qualifier was adopted to mark the modified exon/CDS by GFF2MSS. To fix frameshift caused by "N"-base gapping, V.4.0 cut 1-2 bases of the exon as necessary. These artificially modified mRNA data will be marked with this qualifier on the MSS file.
  • Processing speed was improved by using pandas (e.g., v3 = 14.8s, v4 = 4.2s).

v.3.0

  • --pid option is available to marge the previous protein ID to the new submission.
  • "@@[entry]@@", and "@@[submitter_seqid]@@" were used in submitter_seqid.

v.2.0

  • rRNA and tRNA gene models were supported.
  • A utility for tRNAscan result processing was applied.
  • The license was changed from CC BY to the MIT License

Requirement

Python 3.7. (Biopython, numpy, pandas, argparse, bcbio-gff, gffpandas)

Usage

usage: GFF2MSS.py [-h] -f FASTA -g GFF -a ANN -l LOC -n NAM [-s STN] -o OUT [-m MOL] [-p PID] [-t GTY] [-c GCT]

optional arguments:
  -h, --help            show this help message and exit
  -f FASTA, --fasta FASTA
                        File path to a genome sequence file
  -g GFF, --gff GFF     gff3 file for gene modeling
  -a ANN, --ann ANN     txt file for gene annotation (header = ID, Description)
  -l LOC, --loc LOC     locus_tag prefix
  -n NAM, --nam NAM     organism name
  -s STN, --stn STN     strain
  -o OUT, --out OUT     output MSS file path (default = out.mss.txt)
  -m MOL, --mol MOL     mol_type value (default = genomic DNA)
  -p PID, --pid PID     file for protein ID (Only for the genome version-up)
  -t GTY, --gty GTY     type of linkage_evidence (default = paired-ends)
  -c GCT, --gct GCT     number of Genetic Code Tables (default = 1)

Demo

Example 1: Plastid DNA

python3 GFF2MSS.py \
-f example/Lj3.0_Chloroplastl.fna \
-g example/Lj3.0_cp_gene_models.gff3  \
-a example/Lj3.0_anno.txt \
-l "PRE_TEST_" \
-n "Demo japonicus" \
-s "MG-20" \
-c "11"
-o mss.ex1.out.txt 

Example 2: Eukaryotic nuclear DNA with rDNA and tRNA data

python3 GFF2MSS.py \
-f example2/test.fa \
-g example2/test.gff  \
-a example2/annot.list \
-l "PRE_TEST_" \
-n "Demo japonicus" \
-s "DAOM100" \
-o mss.ex2.out.txt 

Example 3: Eukaryotic nuclear DNA with "N"-base gapping

python3 GFF2MSS.py \
-f example2/test.fa \
-g example2/test.gff  \
-a example2/annot.list \
-l "PRE_TEST_" \
-n "Demo japonicus" \
-s "BB2" \
-t "paired-ends"
-o mss.ex2.out.txt 

rDNA data

To distinct the type of rDNA sequence, please add an attribute, "Type=", for each rRNA sub-features.

  • 18S ribosomal RNA; 18S
  • internal transcribed spacer 1; ITS1
  • 5.8S ribosomal RNA; 5.8S
  • internal transcribed spacer 2; ITS2
  • 28S ribosomal RNA; 28S
e.g.,
chr1	.	gene	2472097	2473907	.	+	.	ID=rRNA_001;Name=chr1_1
chr1	.	rRNA	2472097	2473907	.	+	.	Parent=rRNA_001;ID=rRNA_0011;Name=chr1_1-18S;Type=18S
chr1	.	exon	2472097	2473907	.	+	.	Parent=rRNA_0011;ID=rRNA_00111;Name=rRNA_00111
chr1	.	gene	2473908	2474013	.	+	.	ID=rRNA_002;Name=chr1_1-ITS1;Type=ITS1
chr1	.	rRNA	2473908	2474013	.	+	.	Parent=rRNA_002;ID=rRNA_0021;Name=chr1_1-ITS1;Type=ITS1
chr1	.	exon	2473908	2474013	.	+	.	Parent=rRNA_0021;ID=rRNA_00211;Name=rRNA_00211
chr1	.	gene	2474014	2474165	.	+	.	ID=rRNA_003;Name=chr1-1-5.8S;Type=5.8S
chr1	.	rRNA	2474014	2474165	.	+	.	Parent=rRNA_003;ID=rRNA_0031;Name=chr1-1-5.8S;Type=5.8S
chr1	.	exon	2474014	2474165	.	+	.	Parent=rRNA_0031;ID=rRNA_00311;Name=rRNA_00311

tDNA data

Please use the following GFF3 format for tRNA data.

e.g.,
chr1	.	gene	2	74	.	+	.	ID=t91_gene
chr1	.	tRNA	2	74	.	+	.	Parent=t91_gene;ID=t91_tRNA;Name=tRNA-Lys;anticodon=(pos:45..47,aa:Lys)
chr1	.	exon	2	51	.	+	.	Parent=t91_tRNA;ID=t91_exon_1
chr1	.	exon	60	74	.	+	.	Parent=t91_tRNA;ID=t91_exon_2

"Name" attribute is used as "product" and "anticodon" attribute will be applied as "attribute" in MSS annotation file, as below.

e.g.,
	tRNA	join(2..51,60..74)   	product	tRNA-Lys
			locus_tag	TES_000011100
			anticodon	(pos:45..47,aa:Lys)

./utl/tRNA2gff3.py converts the following type of tab-separated file, which is manually modified from tRNAscan structure prediction, to the GFF3

e.g.,
source	start	end	Type	Anticodon	AntC_start	AntC_end	intron_start	intron_end	Possible_pseudogene
chr1	491917	492013	Ile	TAT	491952	491954	491956	491977	
chr1	917911	917808	Ile	TAT	917876	917874	917872	917845	pseudogene
chr1	917525	917429	Asn	ATT	917490	917488	917486	917463	
chr1	915945	915827	Pro	CGG	915909	915907	915905	915869	pseudogene
chr1	899982	899904	Ile	GAT	899952	899950		

Licence

MIT License

Author

Taro Maeda

gff2mss's People

Contributors

maedat avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.