diff --git a/.gitignore b/.gitignore index fc36a7c..de0f826 100644 --- a/.gitignore +++ b/.gitignore @@ -7,12 +7,12 @@ env/ env365/ install_test/ release/ -DDV/results/ +FluentDNA/results/ release.bat scraps/ env_fresh/ -DDV/data/ -DDV/www-data/ +FluentDNA/data/ +FluentDNA/www-data/ # Created by .ignore support plugin (hsz.mobi) diff --git a/DDV/AnnotatedAlignment.py b/FluentDNA/AnnotatedAlignment.py similarity index 96% rename from DDV/AnnotatedAlignment.py rename to FluentDNA/AnnotatedAlignment.py index 8848604..8212a73 100644 --- a/DDV/AnnotatedAlignment.py +++ b/FluentDNA/AnnotatedAlignment.py @@ -12,11 +12,11 @@ import os from DNASkittleUtils.DDVUtils import editable_str -from DDV.ChainParser import ChainParser, scan_past_header, Batch +from FluentDNA.ChainParser import ChainParser, scan_past_header, Batch from DNASkittleUtils.Contigs import pluck_contig from DNASkittleUtils.DDVUtils import first_word, ReverseComplement -from DDV.Annotations import create_fasta_from_annotation, GFF +from FluentDNA.Annotations import create_fasta_from_annotation, GFF class AnnotatedAlignment(ChainParser): @@ -167,5 +167,5 @@ def markup_annotation_differences(self): aligner.parse_chain(['chr20']) #### ==== Command Line Configuration === #### - # fluentdna.py --chainfile=hg38ToPanTro4.over.chain --fasta=hg38.fa --extrafastas panTro4.fa --ref_annotation=DDV\\data\Hg38_genes.gtf - # --query_annotation=DDV\data\PanTro_refseq2.1.4_genes.gtf --outname=hg38_panTro4_annotated_ + # fluentdna.py --chainfile=hg38ToPanTro4.over.chain --fasta=hg38.fa --extrafastas panTro4.fa --ref_annotation=FluentDNA\\data\Hg38_genes.gtf + # --query_annotation=FluentDNA\data\PanTro_refseq2.1.4_genes.gtf --outname=hg38_panTro4_annotated_ diff --git a/DDV/AnnotatedTrackLayout.py b/FluentDNA/AnnotatedTrackLayout.py similarity index 97% rename from DDV/AnnotatedTrackLayout.py rename to FluentDNA/AnnotatedTrackLayout.py index 1acd04b..e3c7d7c 100644 --- a/DDV/AnnotatedTrackLayout.py +++ b/FluentDNA/AnnotatedTrackLayout.py @@ -3,9 +3,9 @@ from itertools import chain from os.path import join, basename -from DDV.Annotations import create_fasta_from_annotation, find_universal_prefix, parseGFF -from DDV.ParallelGenomeLayout import ParallelLayout -from DDV.DDVUtils import filter_by_contigs, copy_to_sources +from FluentDNA.Annotations import create_fasta_from_annotation, find_universal_prefix, parseGFF +from FluentDNA.ParallelGenomeLayout import ParallelLayout +from FluentDNA.FluentDNAUtils import filter_by_contigs, copy_to_sources class AnnotatedTrackLayout(ParallelLayout): diff --git a/DDV/AnnotationAlignment.py b/FluentDNA/AnnotationAlignment.py similarity index 94% rename from DDV/AnnotationAlignment.py rename to FluentDNA/AnnotationAlignment.py index d25fb4c..58fae7e 100644 --- a/DDV/AnnotationAlignment.py +++ b/FluentDNA/AnnotationAlignment.py @@ -12,13 +12,13 @@ import os from DNASkittleUtils.DDVUtils import editable_str -from DDV.ChainParser import ChainParser +from FluentDNA.ChainParser import ChainParser from DNASkittleUtils.CommandLineUtils import just_the_name -from DDV.RepeatAnnotations import max_consensus_width, read_repeatmasker_csv, \ +from FluentDNA.RepeatAnnotations import max_consensus_width, read_repeatmasker_csv, \ filter_repeats_by_chromosome_and_family -from DDV.Span import alignment_chopping_index, AlignedSpans, Span -from DDV.TransposonLayout import TransposonLayout -from DDV.DDVUtils import make_output_directory +from FluentDNA.Span import alignment_chopping_index, AlignedSpans, Span +from FluentDNA.TransposonLayout import TransposonLayout +from FluentDNA.FluentDNAUtils import make_output_directory def create_aligned_annotation_fragments(alignment, repeat_entries): diff --git a/DDV/Annotations.py b/FluentDNA/Annotations.py similarity index 98% rename from DDV/Annotations.py rename to FluentDNA/Annotations.py index dac9ad4..70ab2e5 100644 --- a/DDV/Annotations.py +++ b/FluentDNA/Annotations.py @@ -8,7 +8,7 @@ from DNASkittleUtils.Contigs import Contig, read_contigs, write_contigs_to_file from DNASkittleUtils.DDVUtils import editable_str -from DDV import gap_char +from FluentDNA import gap_char try: from urllib.parse import unquote @@ -363,12 +363,12 @@ def find_universal_prefix(annotation_list): if __name__ == '__main__': - # annotation = r'DDV\data\Pan_Troglodytes_refseq2.1.4.gtf' + # annotation = r'FluentDNA\data\Pan_Troglodytes_refseq2.1.4.gtf' # target_chromosome = 'chr20' # create_fasta_from_annotation(annotation, target_chromosome, 'Chimp_test_' + target_chromosome + '.fa') - # annotation = r'DDV\data\Pan_Troglodytes_refseq2.1.4.gtf' - # annotation = r'DDV\data\Homo_Sapiens_GRCH38_trimmed.gtf' + # annotation = r'FluentDNA\data\Pan_Troglodytes_refseq2.1.4.gtf' + # annotation = r'FluentDNA\data\Homo_Sapiens_GRCH38_trimmed.gtf' # purge_annotation(annotation) path = r"E:\Genomes\Human\Human Unique Annotation merged.fa" squished = squish_fasta(read_contigs(path), 20, 100) diff --git a/DDV/ChainFiles.py b/FluentDNA/ChainFiles.py similarity index 100% rename from DDV/ChainFiles.py rename to FluentDNA/ChainFiles.py diff --git a/DDV/ChainParser.py b/FluentDNA/ChainParser.py similarity index 98% rename from DDV/ChainParser.py rename to FluentDNA/ChainParser.py index 7113518..d84fb10 100644 --- a/DDV/ChainParser.py +++ b/FluentDNA/ChainParser.py @@ -19,12 +19,12 @@ from DNASkittleUtils.CommandLineUtils import just_the_name from DNASkittleUtils.Contigs import pluck_contig, write_complete_fasta from DNASkittleUtils.DDVUtils import first_word, ReverseComplement, BlankIterator, editable_str -from DDV.DefaultOrderedDict import DefaultOrderedDict -from DDV.ChainFiles import chain_file_to_list, match -from DDV.DDVUtils import make_output_directory, keydefaultdict, read_contigs_to_dict, copy_to_sources -from DDV.Span import AlignedSpans, Span, alignment_chopping_index -from DDV import gap_char -from DDV.TileLayout import hex_to_rgb +from FluentDNA.DefaultOrderedDict import DefaultOrderedDict +from FluentDNA.ChainFiles import chain_file_to_list, match +from FluentDNA.FluentDNAUtils import make_output_directory, keydefaultdict, read_contigs_to_dict, copy_to_sources +from FluentDNA.Span import AlignedSpans, Span, alignment_chopping_index +from FluentDNA import gap_char +from FluentDNA.TileLayout import hex_to_rgb Batch = namedtuple('Batch', ['chr', 'fastas', 'output_folder']) diff --git a/DDV/DefaultOrderedDict.py b/FluentDNA/DefaultOrderedDict.py similarity index 100% rename from DDV/DefaultOrderedDict.py rename to FluentDNA/DefaultOrderedDict.py diff --git a/DDV/DDVUtils.py b/FluentDNA/FluentDNAUtils.py similarity index 99% rename from DDV/DDVUtils.py rename to FluentDNA/FluentDNAUtils.py index 864706f..dd26efa 100644 --- a/DDV/DDVUtils.py +++ b/FluentDNA/FluentDNAUtils.py @@ -73,8 +73,8 @@ def read_contigs_to_dict(input_file_path, extract_contigs=None): def create_deepzoom_stack(input_image, output_dzi): - import DDV.deepzoom - creator = DDV.deepzoom.ImageCreator(tile_size=256, + import FluentDNA.deepzoom + creator = FluentDNA.deepzoom.ImageCreator(tile_size=256, tile_overlap=1, tile_format="png", resize_filter="antialias")# cubic bilinear bicubic nearest antialias diff --git a/DDV/HighlightedAnnotation.py b/FluentDNA/HighlightedAnnotation.py similarity index 98% rename from DDV/HighlightedAnnotation.py rename to FluentDNA/HighlightedAnnotation.py index ae7fe74..92ca047 100644 --- a/DDV/HighlightedAnnotation.py +++ b/FluentDNA/HighlightedAnnotation.py @@ -3,10 +3,10 @@ import sys from PIL import Image, ImageFont -from DDV.Annotations import GFFAnnotation, find_universal_prefix, GFF3Record, parseGFF -from DDV.Span import Span -from DDV.TileLayout import TileLayout -from DDV.DDVUtils import linspace, copy_to_sources +from FluentDNA.Annotations import GFFAnnotation, find_universal_prefix, GFF3Record, parseGFF +from FluentDNA.Span import Span +from FluentDNA.TileLayout import TileLayout +from FluentDNA.FluentDNAUtils import linspace, copy_to_sources def blend_pixel(markup_canvas, pt, c, overwrite=False): diff --git a/DDV/Ideogram.py b/FluentDNA/Ideogram.py similarity index 99% rename from DDV/Ideogram.py rename to FluentDNA/Ideogram.py index c01d450..1c22da6 100644 --- a/DDV/Ideogram.py +++ b/FluentDNA/Ideogram.py @@ -16,13 +16,13 @@ from DNASkittleUtils.Contigs import read_contigs -from DDV.DDVUtils import beep -from DDV.HighlightedAnnotation import HighlightedAnnotation +from FluentDNA.FluentDNAUtils import beep +from FluentDNA.HighlightedAnnotation import HighlightedAnnotation import os import numpy as np from functools import reduce -from DDV.Layouts import LayoutFrame, LayoutLevel +from FluentDNA.Layouts import LayoutFrame, LayoutLevel class IdeogramCoordinateFrame(LayoutFrame): diff --git a/DDV/Layouts.py b/FluentDNA/Layouts.py similarity index 99% rename from DDV/Layouts.py rename to FluentDNA/Layouts.py index 6361a22..e62f150 100644 --- a/DDV/Layouts.py +++ b/FluentDNA/Layouts.py @@ -1,6 +1,6 @@ import sys from PIL import Image, ImageDraw -from DDV.DDVUtils import multi_line_height +from FluentDNA.FluentDNAUtils import multi_line_height class LayoutLevel(object): diff --git a/DDV/MultipleAlignmentLayout.py b/FluentDNA/MultipleAlignmentLayout.py similarity index 98% rename from DDV/MultipleAlignmentLayout.py rename to FluentDNA/MultipleAlignmentLayout.py index eaf333d..ac88b15 100644 --- a/DDV/MultipleAlignmentLayout.py +++ b/FluentDNA/MultipleAlignmentLayout.py @@ -10,11 +10,11 @@ from PIL import Image, ImageDraw import math -from DDV.TileLayout import hex_to_rgb, TileLayout, is_protein_sequence +from FluentDNA.TileLayout import hex_to_rgb, TileLayout, is_protein_sequence from natsort import natsorted -from DDV.DDVUtils import make_output_directory -from DDV.Layouts import level_layout_factory +from FluentDNA.FluentDNAUtils import make_output_directory +from FluentDNA.Layouts import level_layout_factory def fastas_in_folder(input_fasta_folder): diff --git a/DDV/ParallelGenomeLayout.py b/FluentDNA/ParallelGenomeLayout.py similarity index 97% rename from DDV/ParallelGenomeLayout.py rename to FluentDNA/ParallelGenomeLayout.py index af38742..4d63777 100644 --- a/DDV/ParallelGenomeLayout.py +++ b/FluentDNA/ParallelGenomeLayout.py @@ -8,8 +8,8 @@ from PIL import ImageFont, Image from DNASkittleUtils.CommandLineUtils import just_the_name -from DDV.TileLayout import TileLayout, hex_to_rgb -from DDV.Layouts import level_layout_factory +from FluentDNA.TileLayout import TileLayout, hex_to_rgb +from FluentDNA.Layouts import level_layout_factory class ParallelLayout(TileLayout): @@ -102,11 +102,11 @@ def draw_border_boxes(self, fasta_files): To help keep track of it correctly, ParallelGenomeLayout demarcates bundles of columns that go together. Mouse over gives further information on each file.""" from DNASkittleUtils.DDVUtils import pp - from DDV.DDVUtils import execution_dir + from FluentDNA.FluentDNAUtils import execution_dir base_dir = execution_dir() # Caution: These corners are currently hard coded to the color and dimension of one image try: - corner = Image.open(os.path.join(base_dir,'DDV','html_template','img','border_box_corner.png')) + corner = Image.open(os.path.join(base_dir,'FluentDNA','html_template','img','border_box_corner.png')) except FileNotFoundError: corner = Image.open(os.path.join(base_dir, 'html_template', 'img', 'border_box_corner.png')) corner_rb = corner.copy().rotate(270, expand=True) diff --git a/DDV/RepeatAnnotations.py b/FluentDNA/RepeatAnnotations.py similarity index 99% rename from DDV/RepeatAnnotations.py rename to FluentDNA/RepeatAnnotations.py index 4a60cbc..43075d4 100644 --- a/DDV/RepeatAnnotations.py +++ b/FluentDNA/RepeatAnnotations.py @@ -14,8 +14,8 @@ from DNASkittleUtils.Contigs import pluck_contig from DNASkittleUtils.DDVUtils import rev_comp -from DDV.Span import Span -from DDV import gap_char +from FluentDNA.Span import Span +from FluentDNA import gap_char def int_log(num): diff --git a/DDV/Span.py b/FluentDNA/Span.py similarity index 99% rename from DDV/Span.py rename to FluentDNA/Span.py index 18eb421..708cf7a 100644 --- a/DDV/Span.py +++ b/FluentDNA/Span.py @@ -5,7 +5,7 @@ original and gapped sequence as gaps are added.""" from __future__ import print_function, division, absolute_import, \ with_statement, generators, nested_scopes -from DDV import gap_char +from FluentDNA import gap_char class Span(object): """ Span can have sections in the middle removed, creating two or less new Spans. diff --git a/DDV/TileLayout.py b/FluentDNA/TileLayout.py similarity index 98% rename from DDV/TileLayout.py rename to FluentDNA/TileLayout.py index 2ee3bab..de98297 100644 --- a/DDV/TileLayout.py +++ b/FluentDNA/TileLayout.py @@ -12,10 +12,10 @@ from DNASkittleUtils.DDVUtils import copytree from PIL import Image, ImageDraw, ImageFont -from DDV import gap_char -from DDV.DDVUtils import multi_line_height, pretty_contig_name, viridis_palette, \ +from FluentDNA import gap_char +from FluentDNA.FluentDNAUtils import multi_line_height, pretty_contig_name, viridis_palette, \ make_output_directory, filter_by_contigs, copy_to_sources -from DDV.Layouts import LayoutFrame, LayoutLevel, level_layout_factory, parse_custom_layout +from FluentDNA.Layouts import LayoutFrame, LayoutLevel, level_layout_factory, parse_custom_layout small_title_bp = 10000 protein_found_message = False @@ -143,7 +143,7 @@ def activate_high_contrast_colors(self): self.palette['C'] = hex_to_rgb('FF9F00') # Yellow self.palette['T'] = hex_to_rgb('0B56BE') # Blue originally '0F4FA8' self.palette['A'] = hex_to_rgb('00C566') # Green originally ' 00B25C' - # Original DDV Colors + # Original FluentDNA Colors # self.palette['A'] = (255, 0, 0) # self.palette['G'] = (0, 255, 0) # self.palette['T'] = (250, 240, 114) @@ -425,14 +425,14 @@ def get_font(self, font_size): if font_size in self.fonts: font = self.fonts[font_size] else: - from DDV.DDVUtils import execution_dir + from FluentDNA.FluentDNAUtils import execution_dir base_dir = execution_dir() try: with open(os.path.join(base_dir, 'html_template', 'img', "ariblk.ttf"), 'rb') as font_file: font = ImageFont.truetype(font_file, font_size) except IOError: try: - with open(os.path.join(base_dir, 'DDV', 'html_template', 'img', "ariblk.ttf"), 'rb') as font_file: + with open(os.path.join(base_dir, 'FluentDNA', 'html_template', 'img', "ariblk.ttf"), 'rb') as font_file: font = ImageFont.truetype(font_file, font_size) except IOError: print("Unable to load ariblk.ttf size:%i" % font_size) @@ -527,8 +527,8 @@ def generate_html(self, output_folder, output_file_name, overwrite_files=True): print(html_path, ' already exists. Skipping HTML.') return try: - import DDV - module_path = os.path.dirname(DDV.__file__) + import FluentDNA + module_path = os.path.dirname(FluentDNA.__file__) html_template = os.path.join(module_path, 'html_template') copytree(html_template, output_folder) # copies the whole template directory print("Copying HTML to", output_folder) diff --git a/DDV/TransposonLayout.py b/FluentDNA/TransposonLayout.py similarity index 98% rename from DDV/TransposonLayout.py rename to FluentDNA/TransposonLayout.py index 79b5f4b..def43f0 100644 --- a/DDV/TransposonLayout.py +++ b/FluentDNA/TransposonLayout.py @@ -20,10 +20,10 @@ from DNASkittleUtils.Contigs import Contig, read_contigs from DNASkittleUtils.DDVUtils import rev_comp -from DDV.RepeatAnnotations import read_repeatmasker_csv, max_consensus_width, blank_line_array -from DDV.TileLayout import TileLayout -from DDV import gap_char -from DDV.DDVUtils import copy_to_sources +from FluentDNA.RepeatAnnotations import read_repeatmasker_csv, max_consensus_width, blank_line_array +from FluentDNA.TileLayout import TileLayout +from FluentDNA import gap_char +from FluentDNA.FluentDNAUtils import copy_to_sources class TransposonLayout(TileLayout): diff --git a/DDV/UniqueOnlyChainParser.py b/FluentDNA/UniqueOnlyChainParser.py similarity index 97% rename from DDV/UniqueOnlyChainParser.py rename to FluentDNA/UniqueOnlyChainParser.py index d2fba6c..2fe49ae 100644 --- a/DDV/UniqueOnlyChainParser.py +++ b/FluentDNA/UniqueOnlyChainParser.py @@ -3,10 +3,10 @@ from bisect import bisect_left import os from DNASkittleUtils.Contigs import write_complete_fasta -from DDV import gap_char -from DDV.ChainParser import ChainParser, Batch -from DDV.Span import Span -from DDV.ChainFiles import fetch_all_chains +from FluentDNA import gap_char +from FluentDNA.ChainParser import ChainParser, Batch +from FluentDNA.Span import Span +from FluentDNA.ChainFiles import fetch_all_chains class UniqueOnlyChainParser(ChainParser): diff --git a/DDV/__init__.py b/FluentDNA/__init__.py similarity index 100% rename from DDV/__init__.py rename to FluentDNA/__init__.py diff --git a/DDV/deepzoom.py b/FluentDNA/deepzoom.py similarity index 99% rename from DDV/deepzoom.py rename to FluentDNA/deepzoom.py index b13b883..c65f1a1 100644 --- a/DDV/deepzoom.py +++ b/FluentDNA/deepzoom.py @@ -1,4 +1,4 @@ -# This copy of deep zoom has been modified for DDV to fix a bug in .create() for png files. +# This copy of deep zoom has been modified for FluentDNA to fix a bug in .create() for png files. # # # Deep Zoom Tools diff --git a/DDV/example_data/British Ash Tree Genome.png b/FluentDNA/example_data/British Ash Tree Genome.png similarity index 100% rename from DDV/example_data/British Ash Tree Genome.png rename to FluentDNA/example_data/British Ash Tree Genome.png diff --git a/DDV/example_data/Example 7 Gene Families from Fraxinus.png b/FluentDNA/example_data/Example 7 Gene Families from Fraxinus.png similarity index 100% rename from DDV/example_data/Example 7 Gene Families from Fraxinus.png rename to FluentDNA/example_data/Example 7 Gene Families from Fraxinus.png diff --git a/DDV/example_data/Gnetum montanum Annotation - blue gene - yellow exon - green CDS.png b/FluentDNA/example_data/Gnetum montanum Annotation - blue gene - yellow exon - green CDS.png similarity index 100% rename from DDV/example_data/Gnetum montanum Annotation - blue gene - yellow exon - green CDS.png rename to FluentDNA/example_data/Gnetum montanum Annotation - blue gene - yellow exon - green CDS.png diff --git a/DDV/example_data/Gnetum_query_genes.gff b/FluentDNA/example_data/Gnetum_query_genes.gff similarity index 100% rename from DDV/example_data/Gnetum_query_genes.gff rename to FluentDNA/example_data/Gnetum_query_genes.gff diff --git a/DDV/example_data/Gnetum_sample_genes.gff b/FluentDNA/example_data/Gnetum_sample_genes.gff similarity index 100% rename from DDV/example_data/Gnetum_sample_genes.gff rename to FluentDNA/example_data/Gnetum_sample_genes.gff diff --git a/DDV/example_data/Human selenoproteins.fa b/FluentDNA/example_data/Human selenoproteins.fa similarity index 100% rename from DDV/example_data/Human selenoproteins.fa rename to FluentDNA/example_data/Human selenoproteins.fa diff --git a/DDV/example_data/Human vs Chimpanzee_chr19.png b/FluentDNA/example_data/Human vs Chimpanzee_chr19.png similarity index 100% rename from DDV/example_data/Human vs Chimpanzee_chr19.png rename to FluentDNA/example_data/Human vs Chimpanzee_chr19.png diff --git a/DDV/example_data/alignments/HOG10009.fa b/FluentDNA/example_data/alignments/HOG10009.fa similarity index 100% rename from DDV/example_data/alignments/HOG10009.fa rename to FluentDNA/example_data/alignments/HOG10009.fa diff --git a/DDV/example_data/alignments/HOG11602.fa b/FluentDNA/example_data/alignments/HOG11602.fa similarity index 100% rename from DDV/example_data/alignments/HOG11602.fa rename to FluentDNA/example_data/alignments/HOG11602.fa diff --git a/DDV/example_data/alignments/HOG15568.fa b/FluentDNA/example_data/alignments/HOG15568.fa similarity index 100% rename from DDV/example_data/alignments/HOG15568.fa rename to FluentDNA/example_data/alignments/HOG15568.fa diff --git a/DDV/example_data/alignments/HOG21771.fa b/FluentDNA/example_data/alignments/HOG21771.fa similarity index 100% rename from DDV/example_data/alignments/HOG21771.fa rename to FluentDNA/example_data/alignments/HOG21771.fa diff --git a/DDV/example_data/alignments/HOG3700.fa b/FluentDNA/example_data/alignments/HOG3700.fa similarity index 100% rename from DDV/example_data/alignments/HOG3700.fa rename to FluentDNA/example_data/alignments/HOG3700.fa diff --git a/DDV/example_data/alignments/HOG3735.fa b/FluentDNA/example_data/alignments/HOG3735.fa similarity index 100% rename from DDV/example_data/alignments/HOG3735.fa rename to FluentDNA/example_data/alignments/HOG3735.fa diff --git a/DDV/example_data/alignments/HOG9833.fa b/FluentDNA/example_data/alignments/HOG9833.fa similarity index 100% rename from DDV/example_data/alignments/HOG9833.fa rename to FluentDNA/example_data/alignments/HOG9833.fa diff --git a/DDV/example_data/gnetum_sample.fa b/FluentDNA/example_data/gnetum_sample.fa similarity index 100% rename from DDV/example_data/gnetum_sample.fa rename to FluentDNA/example_data/gnetum_sample.fa diff --git a/DDV/example_data/hg38_chr19_sample.fa b/FluentDNA/example_data/hg38_chr19_sample.fa similarity index 100% rename from DDV/example_data/hg38_chr19_sample.fa rename to FluentDNA/example_data/hg38_chr19_sample.fa diff --git a/DDV/example_data/hg38_chr19_sample.png b/FluentDNA/example_data/hg38_chr19_sample.png similarity index 100% rename from DDV/example_data/hg38_chr19_sample.png rename to FluentDNA/example_data/hg38_chr19_sample.png diff --git a/DDV/example_data/phiX.fa b/FluentDNA/example_data/phiX.fa similarity index 100% rename from DDV/example_data/phiX.fa rename to FluentDNA/example_data/phiX.fa diff --git a/DDV/example_data/whole_genome_alignment/chr21_hg38_gapped.fa b/FluentDNA/example_data/whole_genome_alignment/chr21_hg38_gapped.fa similarity index 100% rename from DDV/example_data/whole_genome_alignment/chr21_hg38_gapped.fa rename to FluentDNA/example_data/whole_genome_alignment/chr21_hg38_gapped.fa diff --git a/DDV/example_data/whole_genome_alignment/chr21_hg38_unique.fa b/FluentDNA/example_data/whole_genome_alignment/chr21_hg38_unique.fa similarity index 100% rename from DDV/example_data/whole_genome_alignment/chr21_hg38_unique.fa rename to FluentDNA/example_data/whole_genome_alignment/chr21_hg38_unique.fa diff --git a/DDV/example_data/whole_genome_alignment/panTro5_to_hg38_chr21_gapped.fa b/FluentDNA/example_data/whole_genome_alignment/panTro5_to_hg38_chr21_gapped.fa similarity index 100% rename from DDV/example_data/whole_genome_alignment/panTro5_to_hg38_chr21_gapped.fa rename to FluentDNA/example_data/whole_genome_alignment/panTro5_to_hg38_chr21_gapped.fa diff --git a/DDV/example_data/whole_genome_alignment/panTro5_to_hg38_chr21_unique.fa b/FluentDNA/example_data/whole_genome_alignment/panTro5_to_hg38_chr21_unique.fa similarity index 100% rename from DDV/example_data/whole_genome_alignment/panTro5_to_hg38_chr21_unique.fa rename to FluentDNA/example_data/whole_genome_alignment/panTro5_to_hg38_chr21_unique.fa diff --git a/DDV/fluentdna.py b/FluentDNA/fluentdna.py similarity index 96% rename from DDV/fluentdna.py rename to FluentDNA/fluentdna.py index fe1158e..0e7260c 100644 --- a/DDV/fluentdna.py +++ b/FluentDNA/fluentdna.py @@ -1,6 +1,6 @@ #!/usr/bin/env python """ -FluentDNA DDV 2.0 is a new version of DDV written in Python that allows you to generate a single image +FluentDNA FluentDNA 2.0 is a new version of DDV written in Python that allows you to generate a single image for an entire genome. It was necessary to switch platforms and languages because of intrinsic limitations in the size of image that could be handled by: C#, DirectX, Win2D, GDI+, WIC, SharpDX, or Direct2D. We tried a lot of options. @@ -27,8 +27,8 @@ try: BASE_DIR = os.path.dirname(os.path.abspath(__file__)) except: # just in case __file__ isn't defined in some contexts - import DDV - BASE_DIR = os.path.dirname(DDV.__file__) + import FluentDNA + BASE_DIR = os.path.dirname(FluentDNA.__file__) print('Running in:', BASE_DIR) sys.path.append(BASE_DIR) @@ -41,22 +41,22 @@ multiprocessing.freeze_support() # ----------BEGIN MAIN PROGRAM---------- -from DDV import VERSION +from FluentDNA import VERSION import argparse import gc from DNASkittleUtils.CommandLineUtils import just_the_name -from DDV.DDVUtils import create_deepzoom_stack, make_output_directory, base_directories, \ +from FluentDNA.FluentDNAUtils import create_deepzoom_stack, make_output_directory, base_directories, \ hold_console_for_windows, beep, copy_to_sources, archive_execution_command -from DDV.ParallelGenomeLayout import ParallelLayout -from DDV.AnnotatedTrackLayout import AnnotatedTrackLayout -from DDV.Ideogram import Ideogram -from DDV.HighlightedAnnotation import HighlightedAnnotation -from DDV.ChainParser import ChainParser -from DDV.UniqueOnlyChainParser import UniqueOnlyChainParser -from DDV.AnnotatedAlignment import AnnotatedAlignment -from DDV.TileLayout import TileLayout -from DDV.MultipleAlignmentLayout import MultipleAlignmentLayout +from FluentDNA.ParallelGenomeLayout import ParallelLayout +from FluentDNA.AnnotatedTrackLayout import AnnotatedTrackLayout +from FluentDNA.Ideogram import Ideogram +from FluentDNA.HighlightedAnnotation import HighlightedAnnotation +from FluentDNA.ChainParser import ChainParser +from FluentDNA.UniqueOnlyChainParser import UniqueOnlyChainParser +from FluentDNA.AnnotatedAlignment import AnnotatedAlignment +from FluentDNA.TileLayout import TileLayout +from FluentDNA.MultipleAlignmentLayout import MultipleAlignmentLayout from DNASkittleUtils.Contigs import write_contigs_to_file, read_contigs if sys.platform == 'win32': @@ -114,12 +114,12 @@ def run_server(output_dir=None): success = launch_browser(url, output_dir) try: # Try to determine if this is running in a terminal - import DDV + import FluentDNA handler = server.SimpleHTTPRequestHandler httpd = TCPServer((ADDRESS, PORT), handler) print("Open a browser at " + url) print("If you are using this computer remotely, use CTRL+C to close the browser and " - "find your results in " + os.path.join(os.path.dirname(DDV.__file__), + "find your results in " + os.path.join(os.path.dirname(FluentDNA.__file__), 'results')) if success: httpd.serve_forever() @@ -534,7 +534,7 @@ def main(): args = parser.parse_args() # Respond to an updater query if args.update_name: - print("DDV") + print("FluentDNA") sys.exit(0) elif args.version: print(VERSION) @@ -564,15 +564,15 @@ def main(): parser.error("No layout will be performed if an existing image is passed in! " "Please only define an existing 'image' and the desired 'outfile'.") if not args.image and not args.fasta and not args.run_server: - import DDV + import FluentDNA parser.error('Please start a server with --runserver or define a file to process. Ex: ' + os.path.basename(sys.argv[0]) + - ' --fasta="' + os.path.join(os.path.dirname(DDV.__file__), + ' --fasta="' + os.path.join(os.path.dirname(FluentDNA.__file__), 'example_data','hg38_chr19_sample.fa')+'"') if args.image and args.no_webpage: parser.error("This parameter combination doesn't make sense. You've provided a precalculated image " - "and asked DDV to only generate an image with no DeepZoom stack or webpage.") + "and asked FluentDNA to only generate an image with no DeepZoom stack or webpage.") if args.extra_fastas and not args.layout: args.layout = "parallel" diff --git a/DDV/html_template/Biojs.Sequence.js b/FluentDNA/html_template/Biojs.Sequence.js similarity index 100% rename from DDV/html_template/Biojs.Sequence.js rename to FluentDNA/html_template/Biojs.Sequence.js diff --git a/DDV/html_template/Biojs.js b/FluentDNA/html_template/Biojs.js similarity index 100% rename from DDV/html_template/Biojs.js rename to FluentDNA/html_template/Biojs.js diff --git a/DDV/html_template/DDV-license.txt b/FluentDNA/html_template/DDV-license.txt similarity index 100% rename from DDV/html_template/DDV-license.txt rename to FluentDNA/html_template/DDV-license.txt diff --git a/DDV/html_template/LICENSE b/FluentDNA/html_template/LICENSE similarity index 100% rename from DDV/html_template/LICENSE rename to FluentDNA/html_template/LICENSE diff --git a/DDV/html_template/OpenSeadragon-license.txt b/FluentDNA/html_template/OpenSeadragon-license.txt similarity index 100% rename from DDV/html_template/OpenSeadragon-license.txt rename to FluentDNA/html_template/OpenSeadragon-license.txt diff --git a/DDV/html_template/README.txt b/FluentDNA/html_template/README.txt similarity index 91% rename from DDV/html_template/README.txt rename to FluentDNA/html_template/README.txt index 474ce83..207b94c 100644 --- a/DDV/html_template/README.txt +++ b/FluentDNA/html_template/README.txt @@ -1,4 +1,4 @@ -This folder is the template that is copied to create each of the independent DDV +This folder is the template that is copied to create each of the independent FluentDNA output folders. Since the liceneses are in this folder, they'll be included in any outputs generated. Outputs are designed to be self sufficient apart from any other folder structure. \ No newline at end of file diff --git a/DDV/html_template/biojs-apache-license.txt b/FluentDNA/html_template/biojs-apache-license.txt similarity index 100% rename from DDV/html_template/biojs-apache-license.txt rename to FluentDNA/html_template/biojs-apache-license.txt diff --git a/DDV/html_template/density.php b/FluentDNA/html_template/density.php similarity index 100% rename from DDV/html_template/density.php rename to FluentDNA/html_template/density.php diff --git a/DDV/html_template/fluentdna.css b/FluentDNA/html_template/fluentdna.css similarity index 100% rename from DDV/html_template/fluentdna.css rename to FluentDNA/html_template/fluentdna.css diff --git a/DDV/html_template/img/Grace Hopper.jpg b/FluentDNA/html_template/img/Grace Hopper.jpg similarity index 100% rename from DDV/html_template/img/Grace Hopper.jpg rename to FluentDNA/html_template/img/Grace Hopper.jpg diff --git a/DDV/html_template/img/LEGEND-A-contrast.png b/FluentDNA/html_template/img/LEGEND-A-contrast.png similarity index 100% rename from DDV/html_template/img/LEGEND-A-contrast.png rename to FluentDNA/html_template/img/LEGEND-A-contrast.png diff --git a/DDV/html_template/img/LEGEND-A.png b/FluentDNA/html_template/img/LEGEND-A.png similarity index 100% rename from DDV/html_template/img/LEGEND-A.png rename to FluentDNA/html_template/img/LEGEND-A.png diff --git a/DDV/html_template/img/LEGEND-B.png b/FluentDNA/html_template/img/LEGEND-B.png similarity index 100% rename from DDV/html_template/img/LEGEND-B.png rename to FluentDNA/html_template/img/LEGEND-B.png diff --git a/DDV/html_template/img/LEGEND-C-contrast.png b/FluentDNA/html_template/img/LEGEND-C-contrast.png similarity index 100% rename from DDV/html_template/img/LEGEND-C-contrast.png rename to FluentDNA/html_template/img/LEGEND-C-contrast.png diff --git a/DDV/html_template/img/LEGEND-C.png b/FluentDNA/html_template/img/LEGEND-C.png similarity index 100% rename from DDV/html_template/img/LEGEND-C.png rename to FluentDNA/html_template/img/LEGEND-C.png diff --git a/DDV/html_template/img/LEGEND-D.png b/FluentDNA/html_template/img/LEGEND-D.png similarity index 100% rename from DDV/html_template/img/LEGEND-D.png rename to FluentDNA/html_template/img/LEGEND-D.png diff --git a/DDV/html_template/img/LEGEND-G-contrast.png b/FluentDNA/html_template/img/LEGEND-G-contrast.png similarity index 100% rename from DDV/html_template/img/LEGEND-G-contrast.png rename to FluentDNA/html_template/img/LEGEND-G-contrast.png diff --git a/DDV/html_template/img/LEGEND-G.png b/FluentDNA/html_template/img/LEGEND-G.png similarity index 100% rename from DDV/html_template/img/LEGEND-G.png rename to FluentDNA/html_template/img/LEGEND-G.png diff --git a/DDV/html_template/img/LEGEND-H.png b/FluentDNA/html_template/img/LEGEND-H.png similarity index 100% rename from DDV/html_template/img/LEGEND-H.png rename to FluentDNA/html_template/img/LEGEND-H.png diff --git a/DDV/html_template/img/LEGEND-K.png b/FluentDNA/html_template/img/LEGEND-K.png similarity index 100% rename from DDV/html_template/img/LEGEND-K.png rename to FluentDNA/html_template/img/LEGEND-K.png diff --git a/DDV/html_template/img/LEGEND-M.png b/FluentDNA/html_template/img/LEGEND-M.png similarity index 100% rename from DDV/html_template/img/LEGEND-M.png rename to FluentDNA/html_template/img/LEGEND-M.png diff --git a/DDV/html_template/img/LEGEND-N.png b/FluentDNA/html_template/img/LEGEND-N.png similarity index 100% rename from DDV/html_template/img/LEGEND-N.png rename to FluentDNA/html_template/img/LEGEND-N.png diff --git a/DDV/html_template/img/LEGEND-R.png b/FluentDNA/html_template/img/LEGEND-R.png similarity index 100% rename from DDV/html_template/img/LEGEND-R.png rename to FluentDNA/html_template/img/LEGEND-R.png diff --git a/DDV/html_template/img/LEGEND-S.png b/FluentDNA/html_template/img/LEGEND-S.png similarity index 100% rename from DDV/html_template/img/LEGEND-S.png rename to FluentDNA/html_template/img/LEGEND-S.png diff --git a/DDV/html_template/img/LEGEND-T-contrast.png b/FluentDNA/html_template/img/LEGEND-T-contrast.png similarity index 100% rename from DDV/html_template/img/LEGEND-T-contrast.png rename to FluentDNA/html_template/img/LEGEND-T-contrast.png diff --git a/DDV/html_template/img/LEGEND-T.png b/FluentDNA/html_template/img/LEGEND-T.png similarity index 100% rename from DDV/html_template/img/LEGEND-T.png rename to FluentDNA/html_template/img/LEGEND-T.png diff --git a/DDV/html_template/img/LEGEND-V.png b/FluentDNA/html_template/img/LEGEND-V.png similarity index 100% rename from DDV/html_template/img/LEGEND-V.png rename to FluentDNA/html_template/img/LEGEND-V.png diff --git a/DDV/html_template/img/LEGEND-W.png b/FluentDNA/html_template/img/LEGEND-W.png similarity index 100% rename from DDV/html_template/img/LEGEND-W.png rename to FluentDNA/html_template/img/LEGEND-W.png diff --git a/DDV/html_template/img/LEGEND-Y.png b/FluentDNA/html_template/img/LEGEND-Y.png similarity index 100% rename from DDV/html_template/img/LEGEND-Y.png rename to FluentDNA/html_template/img/LEGEND-Y.png diff --git a/DDV/html_template/img/LEGEND-bg.png b/FluentDNA/html_template/img/LEGEND-bg.png similarity index 100% rename from DDV/html_template/img/LEGEND-bg.png rename to FluentDNA/html_template/img/LEGEND-bg.png diff --git a/DDV/html_template/img/arial.ttf b/FluentDNA/html_template/img/arial.ttf similarity index 100% rename from DDV/html_template/img/arial.ttf rename to FluentDNA/html_template/img/arial.ttf diff --git a/DDV/html_template/img/ariblk.ttf b/FluentDNA/html_template/img/ariblk.ttf similarity index 100% rename from DDV/html_template/img/ariblk.ttf rename to FluentDNA/html_template/img/ariblk.ttf diff --git a/DDV/html_template/img/border_box_corner.png b/FluentDNA/html_template/img/border_box_corner.png similarity index 100% rename from DDV/html_template/img/border_box_corner.png rename to FluentDNA/html_template/img/border_box_corner.png diff --git a/DDV/html_template/img/fullpage_grouphover.png b/FluentDNA/html_template/img/fullpage_grouphover.png similarity index 100% rename from DDV/html_template/img/fullpage_grouphover.png rename to FluentDNA/html_template/img/fullpage_grouphover.png diff --git a/DDV/html_template/img/fullpage_hover.png b/FluentDNA/html_template/img/fullpage_hover.png similarity index 100% rename from DDV/html_template/img/fullpage_hover.png rename to FluentDNA/html_template/img/fullpage_hover.png diff --git a/DDV/html_template/img/fullpage_pressed.png b/FluentDNA/html_template/img/fullpage_pressed.png similarity index 100% rename from DDV/html_template/img/fullpage_pressed.png rename to FluentDNA/html_template/img/fullpage_pressed.png diff --git a/DDV/html_template/img/fullpage_rest.png b/FluentDNA/html_template/img/fullpage_rest.png similarity index 100% rename from DDV/html_template/img/fullpage_rest.png rename to FluentDNA/html_template/img/fullpage_rest.png diff --git a/DDV/html_template/img/home_grouphover.png b/FluentDNA/html_template/img/home_grouphover.png similarity index 100% rename from DDV/html_template/img/home_grouphover.png rename to FluentDNA/html_template/img/home_grouphover.png diff --git a/DDV/html_template/img/home_hover.png b/FluentDNA/html_template/img/home_hover.png similarity index 100% rename from DDV/html_template/img/home_hover.png rename to FluentDNA/html_template/img/home_hover.png diff --git a/DDV/html_template/img/home_pressed.png b/FluentDNA/html_template/img/home_pressed.png similarity index 100% rename from DDV/html_template/img/home_pressed.png rename to FluentDNA/html_template/img/home_pressed.png diff --git a/DDV/html_template/img/home_rest.png b/FluentDNA/html_template/img/home_rest.png similarity index 100% rename from DDV/html_template/img/home_rest.png rename to FluentDNA/html_template/img/home_rest.png diff --git a/DDV/html_template/img/loading.gif b/FluentDNA/html_template/img/loading.gif similarity index 100% rename from DDV/html_template/img/loading.gif rename to FluentDNA/html_template/img/loading.gif diff --git a/DDV/html_template/img/zoomin_grouphover.png b/FluentDNA/html_template/img/zoomin_grouphover.png similarity index 100% rename from DDV/html_template/img/zoomin_grouphover.png rename to FluentDNA/html_template/img/zoomin_grouphover.png diff --git a/DDV/html_template/img/zoomin_hover.png b/FluentDNA/html_template/img/zoomin_hover.png similarity index 100% rename from DDV/html_template/img/zoomin_hover.png rename to FluentDNA/html_template/img/zoomin_hover.png diff --git a/DDV/html_template/img/zoomin_pressed.png b/FluentDNA/html_template/img/zoomin_pressed.png similarity index 100% rename from DDV/html_template/img/zoomin_pressed.png rename to FluentDNA/html_template/img/zoomin_pressed.png diff --git a/DDV/html_template/img/zoomin_rest.png b/FluentDNA/html_template/img/zoomin_rest.png similarity index 100% rename from DDV/html_template/img/zoomin_rest.png rename to FluentDNA/html_template/img/zoomin_rest.png diff --git a/DDV/html_template/img/zoomout_grouphover.png b/FluentDNA/html_template/img/zoomout_grouphover.png similarity index 100% rename from DDV/html_template/img/zoomout_grouphover.png rename to FluentDNA/html_template/img/zoomout_grouphover.png diff --git a/DDV/html_template/img/zoomout_hover.png b/FluentDNA/html_template/img/zoomout_hover.png similarity index 100% rename from DDV/html_template/img/zoomout_hover.png rename to FluentDNA/html_template/img/zoomout_hover.png diff --git a/DDV/html_template/img/zoomout_pressed.png b/FluentDNA/html_template/img/zoomout_pressed.png similarity index 100% rename from DDV/html_template/img/zoomout_pressed.png rename to FluentDNA/html_template/img/zoomout_pressed.png diff --git a/DDV/html_template/img/zoomout_rest.png b/FluentDNA/html_template/img/zoomout_rest.png similarity index 100% rename from DDV/html_template/img/zoomout_rest.png rename to FluentDNA/html_template/img/zoomout_rest.png diff --git a/DDV/html_template/index.html b/FluentDNA/html_template/index.html similarity index 96% rename from DDV/html_template/index.html rename to FluentDNA/html_template/index.html index c34fa67..92eca5f 100644 --- a/DDV/html_template/index.html +++ b/FluentDNA/html_template/index.html @@ -44,7 +44,7 @@