Home
News
Feed
search engine
by
freefind
advanced
Context Independent Sequence Annotator
2015-01-13
azim58 - Context Independent Sequence Annotator Context Independent Sequence Annotator This "Context Independent Sequence Annotator" is a simple program (Java program) which allows you to annotate a sequence of information. The sequence of information required is context independent meaning that the sequence of information can be anything from a timeline, RNA, DNA, protein, text, etc. The program accepts a text file containing simple tags to specify how the sequence of information should be annotated, and then the program outputs an svg (scalable vector graphic) graphic file which can be viewed and edited in any vector graphics editor such as the free vector graphics program Inkscape. Example Use of the Program The program accepts a text file with the annotation information. The file would look something like this. =========================================================================== <information_sequence start_point="0" end_point="100" /> <graphical_line length="200" color="black" /> <annotation name="Annotation_1"> <annotation_graphic start_point="10" end_point="20" annotation_color="red" width="3" size_if_point="3" annotation_track="1" /> <annotation_label label_text="annotation1" font="Verdana" size="8" label_color="red" label_track="2" /> </annotation> <annotation name="Annotation_2"> <annotation_graphic start_point="80" end_point="80" annotation_color="blue" width="5" size_if_point="5" annotation_track="0" /> <annotation_label label_text="annotation2" font="Verdana" size="8" label_color="blue" label_track="-3" /> </annotation> =========================================================================== "C:\kurt\storage\CIM Research Folder\DR\2013\2-8-13\data_download\1104\annotation_information.txt" Here's a few notes about this annotation information. The "information_sequence" "start_point" and "end_point" would refer to arbitrary numbers. Here 0 could mean 0 days and 100 could mean 100 days (the units of everything would need to be the same to get a correct looking graphic at the end). The "graphical_line" "length" just refers to how long you want the information sequence line to visually appear. You may want to make it longer if you feel that everything is too close together and/or labels are overlapping eachother, etc. For an "annotation_graphic", the annotation can be treated as a line or a point. If you want it to appear as a point, then just make the "start_point" and "end_point" the same value. Then specify the size you want this square point to be in the "size_if_point" attribute. If you want it to appear as a line, just make the "start_point" and "end_point" have different values. Tracks The track refers to whether the graphic or label should appear on the information sequence graphic "0", above it ("1", "2", "3", etc.), or below it ("-1", "-2", "-3", etc.). Everything else is fairly self explanatory. The following information sequence text would produce the following graphic. "C:\kurt\storage\CIM Research Folder\DR\2013\2-8-13\data_download\1104\example_annotated_sequence.PNG" Here's another example use of the program to make a dinosaur timeline. "C:\kurt\storage\CIM Research Folder\DR\2013\2-8-13\data_download\1104\dinosaur_timeline.PNG" Here was the annotation information file needed to make this. "C:\kurt\storage\CIM Research Folder\DR\2013\2-8-13\data_download\1104\dinosaure_annotation_information.t xt" Instructions for Using the Program Files needed Template svg file "C:\kurt\storage\CIM Research Folder\DR\2013\2-8-13\data_download\1104\CISA_Template.svg" Context Independent Sequence Annotator Java Class "C:\kurt\storage\CIM Research Folder\DR\2013\2-8-13\data_download\1104\Context_Independent_Sequence_Annot ator_Class.txt" Useful Tools Java Class "C:\kurt\storage\CIM Research Folder\DR\2013\2-8-13\data_download\1104\UsefulTools.txt" Example Annotation Information File "C:\kurt\storage\CIM Research Folder\DR\2013\2-8-13\data_download\1104\annotation_information.txt" * Download the necessary files * Start a new Java project in Eclipse * Create a new class called Context_Independent_Sequence_Annotator in Eclipse and paste the text from the Context_Independent_Sequence_Annotator_Class.txt file into this class in Eclipse * Create a new class called UsefulTools in Eclipse and paste the text from the UsefulTools.txt file into this class in Eclipse * Save the annotation_information.txt file to a place where you know where it is * Save the CISA_Template.svg file to a place where you know where it is * Edit the annotation_information.txt file the way that you would like to so you create your specifications for your annotated sequence * Change two lines of Code in the Context_Independent_Sequence_Annotator in Eclipse. Replace the path on the line with "String svg_template_path =" to the path that is appropriate for you, and replace the path on the line with "String annotation_information_path =" to the path that is appropriate for you. * Run the program in Eclipse. Then open up your cisa_output.svg file in Inkscape or another vector graphics editor to edit it or take a picture, etc.
azim58wiki: