Skip to content

Commit

Permalink
#81 Major: moved www-data/dnadata/ to /results/.
Browse files Browse the repository at this point in the history
  • Loading branch information
josiahseaman committed Sep 26, 2019
1 parent e197acc commit ec7ae6d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 234 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ env/
env365/
install_test/
release/
www-data/to_process
www-data/dnadata
DDV/results/
release.bat
scraps/
env_fresh/
Expand Down
2 changes: 1 addition & 1 deletion DDV/AnnotatedAlignment.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def markup_annotation_differences(self):

if __name__ == '__main__':
output_name = 'hg38_panTro4_annotated_'
base_path = os.path.join('.', 'www-data', 'dnadata', output_name)
base_path = os.path.join('.', 'results', output_name)
chimp_annotation = r'data\PanTro_refseq2.1.4_genes.gtf'
human_anno = r'data\Hg38_genes.gtf'
aligner = AnnotatedAlignment('hg38ToPanTro4.over.chain', 'hg38.fa', human_anno, 'panTro4.fa', chimp_annotation, base_path)
Expand Down
2 changes: 1 addition & 1 deletion DDV/DDVUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def execution_dir():

def base_directories(output_name):
BASE_DIR = execution_dir()
SERVER_HOME = os.path.join(BASE_DIR, 'www-data', 'dnadata')
SERVER_HOME = os.path.join(BASE_DIR, 'results')
base_path = os.path.join(SERVER_HOME, output_name) if output_name else SERVER_HOME
return SERVER_HOME, base_path

Expand Down
14 changes: 1 addition & 13 deletions DDV/Ideogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def process_file(self, input_file_path, output_folder, output_file_name,
# self.palette['T'] = hex_to_rgb('A19E3D') # light green
# self.palette['A'] = hex_to_rgb('6D772F') # Dark Green

def draw_nucleotides(self):
def draw_nucleotides(self, verbose=True):
# points_file_name = os.path.join(self.final_output_location, "test_ideogram_points.txt")
# points_file = None # open(points_file_name, 'w')
# if points_file:
Expand Down Expand Up @@ -293,18 +293,6 @@ def increment(digits, radices, place):


if __name__ == "__main__":
# layout = Ideogram([3,3,3,63], [5,5,3,3,21])
# layout.process_file("example_data/hg38_chr19_sample.fa", 'www-data/dnadata/test ideogram', 'ideogram-padding2')

# layout = Ideogram([3,3,3,63], [5,5,3,3,21], 2, 2)
# layout.process_file("example_data/hg38_chr19_sample.fa", 'www-data/dnadata/test ideogram', 'ideogram-sparse')
# layout = Ideogram(([5,5,5,5,11], # thick, local
# [5,5,5,5,5 ,53], 1, 1))
## thin layout layout = Ideogram([3,3,3,3,3,27], [3,3,3,3,3,3 ,53], 1, 1)
# ([5,5,5,5,5,27], [3,3,3,3,3,3 ,53], 1, 1)
# 3*3*3*3*3*27*
# 3*3*3*3*3 = 1,594,323 bp per fiber row

radix_settings = eval(sys.argv[2])
assert len(radix_settings) == 4 and \
type(radix_settings[0]) == type(radix_settings[1]) == type([]) and \
Expand Down
210 changes: 0 additions & 210 deletions DDV/Sequenaut.py

This file was deleted.

11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ You can start using FluentDNA:
1. Downloading and unzipping the [Latest Release](https://github.com/josiahseaman/FluentDNA/releases) (Mac and Windows only).
2. Open a terminal (command line) in the same folder you unzipped FluentDNA.
3. Run the command `./fluentdna --fasta="DDV/example_data/Human selenoproteins.fa" --runserver`
4. Once your private server has started, all your results available at [http://127.0.0.1:8000](http://127.0.0.1:8000). Note that this server is not actually using the internet at all, it's just using your browser as a file viewer.

To use FluentDNA as a python module (required for Linux), follow the [pip install instructions](https://github.com/josiahseaman/FluentDNA/blob/python-master/docs/installation.md).
4. Your result files will be placed in the FluentDNA directory `DDV/results/`. Once your private server has started,
all your results are viewable at [http://localhost:8000](http://127.0.0.1:8000).

To use FluentDNA as a python module (required for Linux), follow the [pip install instructions](https://github.com/josiahseaman/FluentDNA/blob/python-master/docs/installation.md).
**Locating Results:** You will need to be using the same computer the server is running on. The server will not be visible
over network or internet unless your administrator opens the port.

***

Expand Down Expand Up @@ -45,7 +48,7 @@ This generates an image pyramid with the standard legend (insert image of legend
* FA File: [DDV/example_data/hg38_chr19_sample.fa](https://github.com/josiahseaman/FluentDNA/blob/python-master/DDV/example_data/hg38_chr19_sample.fa)

**Result:** [Hg38 chr19 sample](https://dnaskittle.com/ddvresults/dnadata/Test%20Simple/)
![Example FluentDNA output of Human Chr19 2MBp](https://dnaskittle.com/ddvresults/dnadata/Test%20Simple/Test%20Simple.png)
![Example FluentDNA output of Human Chr19 2MBp](https://dnaskittle.com/ddvresults/dnadata/Test%20Simple/sources/Test%20Simple.png)

It is also possible to generate an image file only that can be accessed with an image viewer using `--no_webpage`.

Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
setup(
name='DDV',
version=VERSION,
description='Visualization tool for fasta files. Supports whole genome alignment and multiple sequence alignment.',
description='Visualization tool for bare fasta files. Supports whole genome alignment and multiple sequence alignment.',
author='Josiah Seaman, Bryan Hurst',
author_email='josiah.seaman@gmail.com',
license='BSD',
packages=find_packages(exclude=('build', 'obj', 'www-data')),
packages=find_packages(exclude=('build', 'obj', 'results')),
include_package_data=True,
package_data={'DDV': ['html_template/*', 'example_data/*',
'html_template/img/*', 'example_data/alignments/*',]},
Expand All @@ -31,7 +31,7 @@
zip_safe=False,
url='https://github.com/josiahseaman/FluentDNA',
download_url='https://github.com/josiahseaman/FluentDNA', # TODO: post a tarball
keywords=['bioinformatics', 'dna', 'fasta', 'chain', 'alignment'],
keywords=['bioinformatics', 'dna', 'fasta', 'chain', 'alignment', 'species diversity'],
classifiers=[
'Development Status :: 4 - Beta', # 5 - Production/Stable
'Intended Audience :: Developers',
Expand Down

0 comments on commit ec7ae6d

Please sign in to comment.