-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from Darcy220606/dev
merge v 0.1.6 into main
- Loading branch information
Showing
13 changed files
with
134 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/usr/bin/env Rscript | ||
|
||
############################## | ||
# Rscript to visualise the complete summary tables generated by AMPcombi #### | ||
############################## | ||
# Date #### | ||
# October, 19 2022 | ||
############################## | ||
# Authors #### | ||
# Anan Ibrahim - [email protected] - @darcy220606 | ||
# Louisa Perelo - [email protected] - @louperelo | ||
############################## | ||
# Working_directory #### | ||
setwd(getwd()) | ||
############################## | ||
# Libraries used + arguments #### | ||
if (!require("dplyr")) install.packages('dplyr') | ||
if (!require("DT")) install.packages('DT') | ||
if (!require("optparse")) install.packages('optparse') | ||
if (!require("htmlwidgets")) install.packages('htmlwidgets') | ||
|
||
library("dplyr") | ||
library("DT") | ||
library("optparse") | ||
library("htmlwidgets") | ||
|
||
option_list = list( | ||
make_option(c("-f", "--file"), type="character", default="AMPcombi_summary.csv", | ||
help="AMpcombi complete summary table [default= %default]", metavar="character"), | ||
make_option(c("-o", "--out"), type="character", default="AMPcombi_summary.html", | ||
help="Provide the name of the output file [default= %default]", metavar="character")); | ||
# Turns warnings off | ||
#options(warn=-1) | ||
opt_parser = OptionParser(option_list=option_list); | ||
opt = parse_args(opt_parser); | ||
|
||
############################## | ||
#Generate HTML interactive files #### | ||
table <- | ||
readr::read_csv(opt$file,show_col_types = FALSE) %>% | ||
unique() | ||
|
||
result<-datatable(table, | ||
class = 'cell-border stripe', ## add column border | ||
options = list( paging = TRUE, ## paginate the output | ||
pageLength = 100, ## number of rows to output for each page | ||
scrollX = TRUE, ## enable scrolling on X axis | ||
scrollY = TRUE, ## enable scrolling on Y axis | ||
autoWidth = TRUE, ## use smart column width handling | ||
#width = 100, | ||
#height=100, | ||
server = FALSE, ## use client-side processing only load the 100 on display | ||
dom = 'Bfrtip', | ||
language = list(sSearch = "Keyword look-up:"), | ||
#bordered = TRUE, | ||
buttons = c('csv', 'excel'), ## the user can just download what on display because server=TRUE | ||
columnDefs = list(list(targets = '_all', className = 'dt-center'), | ||
list(targets='aa_sequence', visible=TRUE, width='20'))), | ||
extensions = 'Buttons', | ||
selection = 'multiple', ## enable selection of a single row | ||
filter = 'top', ## include column filters at the bottom | ||
rownames = FALSE ## don't show row numbers/names | ||
) | ||
|
||
# Change the HTML size to fill the browser | ||
result$sizingPolicy$defaultWidth<-"100%" | ||
|
||
htmlwidgets::saveWidget(result, opt$out, selfcontained = FALSE) | ||
|
||
# CLean up the library folder created | ||
unlink("AMPcombi_summary_files", recursive = TRUE) | ||
############################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = '0.1.5' | ||
__version__ = '0.1.6' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/python3 | ||
|
||
# TITLE: Visualise teh complete summary and save it to a HTML file | ||
|
||
import subprocess | ||
|
||
######################################## | ||
# FUNCTION: GENERATE AN INTERACTIVE HTML SUMMARY | ||
######################################### | ||
def html_generator(): | ||
subprocess.run('HTML.R', text=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
|
||
setup( | ||
name='AMPcombi', | ||
version='0.1.5', | ||
version='0.1.6', | ||
author='Anan Ibrahim, Louisa Perelo', | ||
author_email='[email protected], [email protected]', | ||
packages=['ampcombi'], | ||
|
@@ -17,7 +17,9 @@ | |
'ampcombi/diamond_makedb.sh', | ||
'ampcombi/reformat_tables.py', | ||
'ampcombi/print_header.py', | ||
'ampcombi/version.py'], | ||
'ampcombi/version.py', | ||
'ampcombi/visualise_complete_summary.py', | ||
'ampcombi/HTML.R'], | ||
url='http://pypi.python.org/pypi/AMPcombi/', | ||
license='LICENSE.txt', | ||
description='A parsing tool for AMP tools.', | ||
|
Oops, something went wrong.