Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorportate batch of logging support changes #147

Merged
merged 59 commits into from
Nov 29, 2023
Merged

Incorportate batch of logging support changes #147

merged 59 commits into from
Nov 29, 2023

Conversation

owlang
Copy link
Collaborator

@owlang owlang commented Oct 17, 2023

PR for the next batch of tools that have logging support added

Erikpav and others added 25 commits July 6, 2023 12:57
#132 Added logging for BAIIndexer, MergeBAM, and SortBED. A bit unsure about the getCLIcommand arguments for SortBED but it seems to work the way it is.
#132 Added the logging feature into BAMtoscIDX
#132 Added logging to the 3 remaining BAM Format Converter tools. Still working on adding logging to ExpandBED.
#132 Added logging to SortBAM
#132 Added the logging feature to FilterforPIPseq
#132 Added logging support to MergeHeatMap. I am unsure about this implementation due to the differing inputs/outputs when comparing the window class to the flags. I grabbed the Arraylist<File> to File conversion from MergeHeatMap output and it seems to work fine.

Along with this all BAM format converter strain flags were replaced with the proper if else statements and outputs rather than just an -s flag.
#132 Added logging support to ExpandBED
#132 Adding the logging feature to GFFtoBED
#132 Added the logging feature to ExpandGFF and SortGFF. Did some minor tweaking to ExpandBED and SortBED.
#132 Added logging support to LabelHeatMap. Refactored logging for MergeHeatMap.

I am unsure about these two tools as I believe the logging works but I am not familiar with these tools so if something is not working properly I am not aware of it.
#132 Added logging support to TwoColorHeatMap using similar code to the other two figure generation tools to get logging support. I am still unsure if the functionality is perfect.
#132 Added the logging feature to BEDPeakAlignToRef.
#132 Added logging support into SearchMotif and FASTAExtract.
#132 Added the logging feature to ShiftCoord
#132 Added Logging Support to FilterBEDbyProximity.

Also, did some editing on all CLI's with booleans and hex colors to get a proper output.
#132 Removed unused imports across all classes with logging support.
#132 Added Logging support to random coordinate.
#132 Added Logging to Paired-End Statistics.
#132 Added Logging Support to SEStats.
#132 Added Logging support to CrossCorrelation
Move LogItem construction to *Output class for BAM Format Converter tools so that it can access the output filepath. Adjust *Window accordingly

Also fix incorrect ordering of getCLIcommand parameter order (correct in call from *Output). Also adjust flag options logic in command construction to account for default/unset `-m` and `-x` values.
Fix subcommand string in command string construction in getCLIcommand across CLI classes

Add missing propertyChange method to fire log property from Window to main.
Fix subcommand string in command string construction in getCLIcommand across CLI classes

Only write command in TwoColorHeatmap if OUTPUTSTATUS is true

Also fix incorrect ordering of getCLIcommand parameter order. Also adjust flag options logic in command construction to interpret compression method string.
Fix subcommand string in command string construction in getCLIcommand for filter-pip-seq
Fix subcommand string in command string construction in getCLIcommand across CLI classes
fix `coordinate-manipulation` --> `bam-format-converter` copy-paste error
FASTAExtractCLI
- fix subcommand string in command string construction in getCLIcommand()
- add javadocs to getCLIcommand()
- fix parameter structure in getCLIcommand() from FASTAExtractCLI to match argument order in script class call
FASTAExtractOutput and FASTAExtractWindow
- change fireProperty for progress bar updates to match format of other *Output.java classes
- adjust getCLIcommand() call to use proper argument order (booleans swapped)
- add final progress bar update to 100%
SearchMotifCLI
- fix subcommand string in command string construction in getCLIcommand()
- add javadocs to getCLIcommand()
SearchMotifOutput and SearchMotifWindow
- restructure log item update (use only one b/c for loop handled in Window)
- add final progress bar update to 100%
ScriptManagerGUI
- add missing property change listener to main class for extract fasta tool
DNAShapefromBEDCLI
-add getCLIcommand() with javadocs
DNAShapefromFASTACLI
-add getCLIcommand() with javadocs
ScriptManagerGUI
- add property change listener for DNAShapefromBED (DNAShapefromFASTA already there)
DNAShapefromBEDOutput and Window
- add logitem creation and update steps
- add logging propertyChange listener
- add final progress bar update to 100%
- rename output_obj for consistency
- rename progress property change
- restructure try-catch statements to handle exceptions in Window
DNAShapefromFASTAOutput and Window
- add logitem creation and update steps
- add logging propertyChange listeners
- add final progress bar update to 100%
- rename output_obj for consistency
- rename progress property change
- restructure try-catch statements to handle exceptions in Window
RandomizeFASTACLI
-add getCLIcommand() with javadocs
ScriptManagerGUI
- add property change listener
ScriptManagerGUI
- add property change listener
RandomizeFASTA
- rename input and output parameters
RandomizeFASTAWindow
- add logitem creation and update steps
- add logging propertyChange listeners
- add final progress bar update to 100%
- restructure try-catch statements to handle exceptions in Window
owlang added 22 commits October 31, 2023 19:13
ScriptManagerGUI
- add property change listener

TileGenomeCLI
-add getCLIcommand() with javadocs
- adjust to script constructor signature change (reorder inputs)
TileGenome
- reorder constructor params for consistency with other tools (input files, output opts, other opts, gui-specific opts)
TileGenomeWindow
- adjust inputs/script call structures to account for changes in script class signature
- add logitem creation and update steps- add GUI handling of various exceptions thrown by script class for consistency with other tools
- add logging propertyChange listeners- standardize output filename construction for consistency with other tools
- rename OUTPUT_PATH to OUT_DIR for consistency with other tools
adjust logging for Figure Generation to fix bugs and add javadocs to getCLIcommand()

All Window classes:
- rename *Output object as output_obj for consistency with other tools
- standardize output filename construction for consistency with other tools
- rename property firing for progress updates to "progress"
- add setProgress(100) and setProgress(0) at the beginning and end of the main Task block
- add GUI handling of various exceptions thrown by script class for consistency with other tools

LabelHeatMapOutput and Window
- remove superfluous getTimestamp() method

MergeHeatMapCLI
- rename inputs to getCLIcommand()
- remove incorrect appending of "merge.png"
MergeHeatMapOutput and Window
- bugfix - for un-matched sense/anti PNGs, log item might not update appropriately so LogItem intialization and update done completely within same if-else block.
- remove addImage(String name, JLabel pic) helper and hardcode back into main code block
- (Window) put Output instantiation code in try-catch block

TwoColorHeatMapOutput and Window
- remove superfluous System print statements
- remove superfluous getTimestamp() method
ScriptManagerGUI
- add property change listener

FourColorSequenceCLI
-add getCLIcommand() with javadocs

FourColorSequenceWindow
- initialize log item and update log item code blocks
- add log property change listener
- add GUI handling of various exceptions thrown by script class for consistency with other tools
- standardize output filename construction for consistency with other tools
ScriptManagerGUI
- add property change listener

CompositePlotCLI
- add getCLIcommand() with javadocs
- fix validateInput() to account for undefined output directory

PlotCompositeOutput
- rename OUTPUT_STATUS for consistency with other tools
- initialize log item and update log item code blocks
- switch fire property name "composite" --> "progress" for consistency with other tools
- remove superfluous getTimeStamp() and STDOUT print statements

PlotCompositeWindow
- bugfix - handle NoSuchElementException for parsing imroperly formatted inputs
- set OUT_DIR if not defined
- add log property change listener
- add GUI handling of various exceptions thrown by script class for consistency with other tools
- standardize output filename construction for consistency with other tools
ScriptManagerGUI
- add property change listener

ThreeColorHeatMapCLI
- add getCLIcommand() with javadocs

ThreeColorHeatMapOutput
- rename OUTPUT_PATH to OUT_DIR for consistency with other tools
- adjust handling of incompatible threshold values with an Exception (remove postDialog String)
- initialize log item and update log item code blocks
- standardize output filename construction for consistency with other tools

ThreeColorHeatMapWindow
- add log property change listeners
- rename *Output object as output_obj for consistency with other tools
- add GUI handling of various exceptions thrown by script class for consistency with other tools
- remove superfluous System print statements
- remove superfluous getTimestamp() method
ScriptManagerGUI
- add property change listener

ConvertBED/GFFChrNamesCLI
- add getCLIcommand() with javadocs

ConvertBED/GFFChrNamesWindow
- add log property change listeners
- standardize output filename construction for consistency with other tools
- initialize log item and update log item code blocks
- add try-catch block for GUI handling of various exceptions thrown by script class for consistency with other tools
ScriptManagerGUI
- add property change listener

ScriptManager
- add two tools to CLI

CompressFileCLI and DecompressGZFileCLI
- initialize CLI (non existent before, violating ScriptManager architecture rules)
- execution of script should simply print information for finding gzip utility (linux style)
- add getCLIcommand() with javadocs

CompressFileWindow and DecompressGZFileWindow
- move task block into try-catch statement
- initialize and update log item
- add property change listener
- add GUI handling of try-catch exceptions
ScriptManagerGUI
- add property change listener

MD5ChecksumCLI
- adjust CLI to write to STDOUT instead of `md5checksum.txt` by default
-add getCLIcommand() with javadocs - leverage STDOUT default writing to shell-style append MD5 checksum results

MD5ChecksumWindow
- initialize log item and update log item code blocks
- add log property change listener
- add GUI handling of various exceptions thrown by script class for consistency with other tools
- standardize OUT_DIR filename update for consistency with other tools
ScriptManagerGUI
- add property change listener

ScalingFactorCLI
- add getCLIcommand() with javadocs (use new scaling method encodings)

ScalingFactor
- move OUTPUT_STATUS to last parameter for consisstency with other tools
- add final constants for encoding scaling method

ScalingFactorOutput
- Move OUTPUT_STATUS to last parameter for consisstency with other tools
- rename OUTPUT_PATH to OUT_DIR and OUTPUTSTATUS to OUTPUT_STATUS for consistency with other tools
- initialize log item and update log item code blocks
- standardize output filename construction for consistency with other tools
- change propertyChange "scale" to "progress" for consistency with other tools

ScalingFactorWindow
- initialize log item and update log item code blocks
- use ScalingFactor scaleType constants
- add log property change listener
- add GUI handling of various exceptions thrown by script class for consistency with other tools
- rename *Output object as output_obj for consistency with other tools
- standardize OUT_DIR filename update for consistency with other tools
ScriptManagerGUI
- add property change listener

ScaleMatrixCLI
- add getCLIcommand() with javadocs

FourColorSequenceWindow
- initialize log item and update log item code blocks
- add log property change listener
- add GUI handling of various exceptions thrown by script class for consistency with other tools
- standardize output filename construction for consistency with other tools
update code with missing javadocs param tags and method override tag decorations

also removal of duplicate comments and fixing of whitespace
add generic Exception handling for GUI windows such that...
- a standard ToolDescriptions comment pops up
- comment directs users to open an issue ticket (if one is not already made)
- comment includes message from Exception object for more detail about error
- also prints stacktrace of exception
add ScriptManager

also removed some unused imports
Instantiation of *Output.java objects was named differently from tool-to-tool. For consistency across tools, I am renaming them all `object_obj`
in addition to the logging primary tool's executio, the indexing of output commands should also be logged
the RtoA/AtoR logic was inverted for the getCLIcommand function
the adjacent booleans in the method signature for gzOutput and isGFF were meixed up in the logging function getCLIcommand and in the method call in the GUI. This commit fixes this bug
Many default output file construction statements in *CLI and *Window/*Output classes were missing the ".gz" extension. This commit fixes these statements
There is more than one exception package in this codebase so I am consolidating them under `scriptmanager.objects.Exceptions`
allow window components to track output filename and verbosity level (remove getters and setters too)
ScriptManagerGUI
- add property change listener for AggregateData

AggregateData
- create final static constants for encoding aggregation types
- throw Exceptions instead of setting "endMessage" variable
- restructure PrintStream construction

AggregateDataCLI
- add getCLIcommand() with javadocs
- add support for static constants encoding aggregation types

AggregateDataOutput and Window
- add logitem creation and update steps
- add logging propertyChange listener
- add final progress bar update to 100%
- set OUT_DIR button will no longer set OUT_DIR to null if user clicks "Cancel" in FileSelector
Add skeleton code for GeneTrack, PeakPair, SignalDuplication, and Similarity matrix tools
- default filename construction for ConvertBED/GFFChrNames tools fixed to match flags
- remove extra update log item code block in BAMMarkDupWindow
- include final setProgress(100) for ExpandBED and SortBAM
- make sure to initialize LogItem old_li to null for BEDtoGFFWindow (for consistency with other tools)
- Change handling of null values from OUT_DIR file selector in TagPileup
@owlang owlang merged commit 6520743 into dev Nov 29, 2023
6 checks passed
@owlang
Copy link
Collaborator Author

owlang commented Nov 29, 2023

#132
and all tools should have some sort of logging support. This is the first round draft so logging will be hidden for v0.15 until testing proves logging to be robust.

@owlang owlang deleted the olivia-logging branch November 29, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants