Commit 60bb9b65 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

remove deprecated fields used for POC

parent 0c66ad71
# Generated by Django 2.2.1 on 2019-06-07 08:47
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Gene',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('gene_id', models.CharField(db_index=True, max_length=100, unique=True)),
('gene_length', models.IntegerField()),
('taxonomic_genus', models.CharField(max_length=100)),
('taxonomic_phylum', models.CharField(max_length=100)),
],
),
]
......@@ -4,8 +4,6 @@ from django.db import models
class Gene(models.Model):
gene_id = models.CharField(max_length=100, unique=True, db_index=True)
gene_length = models.IntegerField()
taxonomic_genus = models.CharField(max_length=100)
taxonomic_phylum = models.CharField(max_length=100)
def __str__(self):
return self.gene_id
......@@ -6,4 +6,4 @@ class GeneSerializer(serializers.ModelSerializer):
class Meta:
model = Gene
fields = ('gene_id', 'gene_length', 'taxonomic_genus', 'taxonomic_phylum')
fields = ('gene_id', 'gene_length')
......@@ -18,11 +18,27 @@ _LOGGER = logging.getLogger(__name__)
def create_gene(raw_line):
"""
IGC annotation columns:
0: Gene ID Unique ID
1: Gene Name Unique name
2: Gene Length Length of nucleotide sequence
3: Gene Completeness Status Stating a gene is complete or partial according to the gene predictor
4: Cohort Origin Stating the cohort contributing the representative gene
5: Taxonomic Annotation(Phylum Level) Annotated phylum for a gene
6: Taxonomic Annotation(Genus Level) Annotated genus for a gene
7: KEGG Annotation Annotated KO(s) for a gene
8: eggNOG Annotation Annotated eggNOG(s) for a gene
9: Sample Occurence Frequency Occurrence frequency in samples based on gene profile
10:Individual Occurence Frequency Occurrence frequency in individuals based on gene profile
11: KEGG Functional Categories KEGG functional category(ies) of the annotated KO(s)
12: eggNOG Functional Categories eggNOG functional category(ies) of the annotated eggNOG(s)
13: Cohort Assembled Stating the metagenomic sequencing cohort(s) contributing the
representative gene or a redundant gene belonging to it
"""
gene_info = raw_line.rstrip().split('\t')
gene = Gene(gene_id=gene_info[1],
gene_length=gene_info[2],
taxonomic_genus=gene_info[6],
taxonomic_phylum=gene_info[5])
gene_length=gene_info[2])
return gene
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment