Skip to content
Snippets Groups Projects
main.py 2.05 KiB
Newer Older
#!/home/nina/annotpangenome/.venv/bin/python
# created by Nina Marthe 2023 - nina.marthe@ird.fr
from Functions_output import *
if run=="chr3":
    intersect_path='/home/nina/annotpangenome/chr3/intersect_segments_genes_irgsp_chr3.bed'
    load_intersect(intersect_path)

    # outputs the gff of the graph for chr10
    output_gff='graph_chr3.gff'
    gfa="test_graph"
    graph_gff(output_gff)

    pos_seg="seg_coord/AzucenaRS1_chromosome3_corrected.bed"
    out="azucena_chr3.gff"


    gff="graph_chr3.gff"

    # outputs the gff of a genome for the chr10
    genome_gff(pos_seg,gff,out,gfa)

    # creates segments and features for the intersect between the graph for chr10 and the gff of IRGSP
    intersect_path='/home/nina/annotpangenome/align_genes/intersect_segments-genes_chr10.bed'
    load_intersect(intersect_path)
    # outputs the gff of the graph for chr10
    output_gff='graph_chr10.gff'
    output_gaf='graph_chr10.gaf'
    gfa="data/graphs/RiceGraphChr10_cactus.gfa"
    graph_gff(output_gff)
    graph_gaf(output_gaf,gfa)
    genome = 'ac'
    if genome=='ac': # transfer from graph to azucena
        pos_seg="seg_coord/AzucenaRS1_chromosome10.bed"
        out="azucena_chr10.gff"
    if genome=='nb': # transfer from graph to nipponbare
        out="nb_chr10_all.gff"
        pos_seg="seg_coord/IRGSP-1_0_Chr10.bed"

    gff="graph_chr10.gff"

    # outputs the gff of a genome for the chr10
    genome_gff(pos_seg,gff,out,gfa)

if run=="test":
    intersect_path='/home/nina/annotpangenome/test_data/input_data/intersect.bed'
    load_intersect(intersect_path)

    # outputs the gff of the graph for chr10
    output_gff='test_data/graph.gff'
    output_gaf='test_data/graph.gaf'
    gfa="test_data/input_data/graph_test.gfa"
    graph_gff(output_gff)
    graph_gaf(output_gaf,gfa)

    out="test_data/target_genome.gff"
    pos_seg="test_data/input_data/genome4_chr10.bed"

    gff="test_data/graph.gff"

    # outputs the gff of a genome for the chr10
    genome_gff(pos_seg,gff,out,gfa)