Skip to content
Snippets Groups Projects
main.py 2.5 KiB
Newer Older
#!/home/nina/annotpangenome/.venv/bin/python
# created by Nina Marthe 2023 - nina.marthe@ird.fr
from Functions_output import *
if run=="test":
    intersect_path='/home/nina/annotpangenome/test_data/input_data_inf/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_inf/graph_test.gfa"
    graph_gff(output_gff)
    graph_gaf(output_gaf,gfa)

    out_once="test_data/target_genome.gff"
    out_var="test_data/variations.txt"
    out_detail="test_data/target_genome_detail.gff"
    pos_seg="test_data/input_data_inf/genome4_chr10.bed"

    gff="test_data/graph.gff"

    # outputs the gff of a genome for the chr10
    genome_gff(pos_seg,gff,gfa,out_once,out_detail,out_var)


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_once="azucena_chr3.gff"
    out_var="variations_chr3.txt"
    out_detail="azucena_detail_chr3.gff"


    gff="graph_chr3.gff"

    # outputs the gff of a genome for the chr10
    genome_gff(pos_seg,gff,gfa,out_once,out_detail,out_var)
    # 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_once="azucena_chr10.gff"
        out_detail="azucena_detail_chr10.gff"
        out_var="variations_chr10.gff"
    if genome=='nb': # transfer from graph to nipponbare
        pos_seg="seg_coord/IRGSP-1_0_Chr10.bed"
        out_once="nb_chr10_all.gff"
        out_detail="nb_chr10_all_detail.gff"
        out_var="variations_chr10.gff"

    gff="graph_chr10.gff"

    # outputs the gff of a genome for the chr10
    genome_gff(pos_seg,gff,gfa,out_once,out_detail,out_var)