# Generated by Django 5.1.2 on 2025-01-19 09:42

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('tcgabcd', '0006_alter_patient_dataset'),
    ]

    operations = [
        migrations.AlterField(
            model_name='gene',
            name='entrez_gene_id',
            field=models.IntegerField(blank=True, help_text='Unique Entrez Gene ID', null=True, unique=True),
        ),
        migrations.AlterModelTable(
            name='geneexpression',
            table=None,
        ),
        migrations.CreateModel(
            name='Cna',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.IntegerField(help_text='cna_value for the gene expression')),
                ('gene', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cna', to='tcgabcd.gene')),
                ('patient', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cna', to='tcgabcd.patient')),
            ],
            options={
                'verbose_name': 'CNA',
                'verbose_name_plural': 'CNA',
                'unique_together': {('gene', 'patient')},
            },
        ),
        migrations.CreateModel(
            name='Cna_hg19',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('chromosome', models.CharField(max_length=5)),
                ('loc_start', models.PositiveIntegerField()),
                ('loc_end', models.PositiveIntegerField()),
                ('num_mark', models.FloatField()),
                ('seg_mean', models.FloatField()),
                ('patient', models.ForeignKey(help_text='Reference to the patient associated with this', on_delete=django.db.models.deletion.CASCADE, related_name='cna_hg19', to='tcgabcd.patient')),
            ],
            options={
                'verbose_name': 'CNA HG19',
                'verbose_name_plural': 'CNA HG19',
                'indexes': [models.Index(fields=['patient_id'], name='tcgabcd_cna_patient_487aab_idx')],
            },
        ),
        migrations.CreateModel(
            name='SvData',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sv_status', models.CharField(help_text='Status of the structural variant (e.g., SOMATIC)', max_length=50)),
                ('patient', models.ForeignKey(help_text='Reference to the patient associated with this', on_delete=django.db.models.deletion.CASCADE, related_name='sv_data', to='tcgabcd.patient')),
                ('site1_gene', models.ForeignKey(help_text='Reference to the gene at site 1', on_delete=django.db.models.deletion.CASCADE, related_name='site1_sv_data', to='tcgabcd.gene')),
                ('site2_gene', models.ForeignKey(help_text='Reference to the gene at site 2', on_delete=django.db.models.deletion.CASCADE, related_name='site2_sv_data', to='tcgabcd.gene')),
            ],
            options={
                'verbose_name': 'Structural Variant Data',
                'verbose_name_plural': 'Structural Variant Data',
                'indexes': [models.Index(fields=['patient_id'], name='tcgabcd_svd_patient_217ec0_idx')],
            },
        ),
    ]
