JoshuaTree2.py
def extract_syntenic_blocks(fasta_1, fasta_2, gff_1, gff_2, link_file, gene_info, loci_threshold, work_dir):
    """Run pairwise circos in local directory."""
    work_dir += '/'
    genome1 = Genome(fasta_file=fasta_1, bed_file=work_dir+gff_1.split('.')[-2]+'.bed', protID=gff_1.split('.')[-2], gff_file=gff_1, gene_info=gene_info)
    genome2 = Genome(fasta_file=fasta_2, bed_file=work_dir+gff_2.split('.')[-2]+'.bed', protID=gff_2.split('.')[-2], gff_file=gff_2, gene_info=gene_info)
    if not link_file:
        genome1.extract_CDS()
        genome2.extract_CDS()
    pairwise_synteny = PairwiseSynteny(genome1,genome2,link_file,loci_threshold=loci_threshold)
    pairwise_synteny.generate_synteny_structure('./')
    pairwise_synteny.synteny_structure_2_bed(work_dir+'/%s.%s.synteny.bed'%(pairwise_synteny.q_genome.protID,pairwise_synteny.s_genome.protID))
Run pairwise circos in local directory.
Run pairwise circos in local directory.
Run pairwise circos in local directory .
def extract_syntenic_blocks(fasta_1, fasta_2, gff_1, gff_2, link_file, gene_info, loci_threshold, work_dir):
    work_dir += '/'
    genome1 = Genome(fasta_file=fasta_1, bed_file=work_dir+gff_1.split('.')[-2]+'.bed', protID=gff_1.split('.')[-2], gff_file=gff_1, gene_info=gene_info)
    genome2 = Genome(fasta_file=fasta_2, bed_file=work_dir+gff_2.split('.')[-2]+'.bed', protID=gff_2.split('.')[-2], gff_file=gff_2, gene_info=gene_info)
    if not link_file:
        genome1.extract_CDS()
        genome2.extract_CDS()
    pairwise_synteny = PairwiseSynteny(genome1,genome2,link_file,loci_threshold=loci_threshold)
    pairwise_synteny.generate_synteny_structure('./')
    pairwise_synteny.synteny_structure_2_bed(work_dir+'/%s.%s.synteny.bed'%(pairwise_synteny.q_genome.protID,pairwise_synteny.s_genome.protID))
def extract_syntenic_blocks ( fasta_1 , fasta_2 , gff_1 , gff_2 , link_file , gene_info , loci_threshold , work_dir ) : work_dir += '/' genome1 = Genome ( fasta_file = fasta_1 , bed_file = work_dir + gff_1 . split ( '.' ) [ - 2 ] + '.bed' , protID = gff_1 . split ( '.' ) [ - 2 ] , gff_file = gff_1 , gene_info = gene_info ) genome2 = Genome ( fasta_file = fasta_2 , bed_file = work_dir + gff_2 . split ( '.' ) [ - 2 ] + '.bed' , protID = gff_2 . split ( '.' ) [ - 2 ] , gff_file = gff_2 , gene_info = gene_info ) if not link_file : genome1 . extract_CDS ( ) genome2 . extract_CDS ( ) pairwise_synteny = PairwiseSynteny ( genome1 , genome2 , link_file , loci_threshold = loci_threshold ) pairwise_synteny . generate_synteny_structure ( './' ) pairwise_synteny . synteny_structure_2_bed ( work_dir + '/%s.%s.synteny.bed' % ( pairwise_synteny . q_genome . protID , pairwise_synteny . s_genome . protID ) )
Run pairwise circos in local directory.
Run pairwise circos in local directory .
"""Run pairwise circos in local directory."""
fasta_1
fasta_2
gff_1
gff_2
link_file
gene_info
loci_threshold
work_dir