diff --git a/act b/act index 4200521ecdb9b2301b3e989c86fcdd295cd31de7..365fe5e99f0b2f974415a6a98724989ef8f45b62 100755 --- a/act +++ b/act @@ -43,6 +43,8 @@ CLASSPATH=$CLASSPATH:$ACT_HOME/lib/ibatis/ibatis-2.3.4.726.jar:$ACT_HOME/lib/iba # picard jars CLASSPATH=$ACT_HOME/lib/picard/sam.jar:$ACT_HOME/lib/picard/picard.jar:$CLASSPATH +CLASSPATH="$ACT_HOME/lib/commons-lang-2.6.jar:$CLASSPATH" + export CLASSPATH ACT_PROPERTIES="-Dartemis.environment=UNIX" diff --git a/art b/art index 180d77379adb6537595fc1b98b8891c9afaf550f..f8fe4fe68b42da14fac53d7ca48735e3b515c3e8 100755 --- a/art +++ b/art @@ -40,6 +40,9 @@ export CLASSPATH # picard jars CLASSPATH=$ARTEMIS_HOME/lib/picard/sam.jar:$ARTEMIS_HOME/lib/picard/picard.jar:$ARTEMIS_HOME/lib/commons-net-2.2.jar:$CLASSPATH + +CLASSPATH="$ARTEMIS_HOME/lib/commons-lang-2.6.jar:$CLASSPATH" + export CLASSPATH diff --git a/docs/act_start_chapter.sgml b/docs/act_start_chapter.sgml index 45b24c13b8ad37e822055e3a4457b414f0d478e7..b41b4567748968b6a5f491584fc4dbb52cd947a6 100644 --- a/docs/act_start_chapter.sgml +++ b/docs/act_start_chapter.sgml @@ -170,7 +170,7 @@ cd ~/act <PARA> <COMMAND> -java -classpath lib/biojava.jar:lib/jemAlign.jar:lib/j2ssh/j2ssh-core.jar:lib/ibatis/ibatis-2.3.4.726.jar:lib/ibatis/log4j-1.2.14.jar:lib/chado-14-interface.jar:lib/postgresql-8.4-701.jdbc3.jar:lib/picard.jar:lib/picard/sam.jar:lib/batik/batik-awt-util.jar:lib/batik/batik-codec.jar:lib/batik/batik-dom.jar:lib/batik/batik-ext.jar:lib/batik/batik-svggen.jar:lib/batik/batik-util.jar:lib/batik/batik-xml.jar:. -Dartemis.environment=UNIX uk.ac.sanger.artemis.components.ActMain +java -mx500m -ms100m -classpath lib/biojava.jar:lib/jemAlign.jar:lib/j2ssh/j2ssh-core.jar:lib/ibatis/ibatis-2.3.4.726.jar:lib/ibatis/log4j-1.2.14.jar:lib/ibatis/cglib-nodep-2.2.jar:lib/postgresql-8.4-701.jdbc3.jar:lib/picard.jar:lib/picard/sam.jar:lib/batik/batik-awt-util.jar:lib/batik/batik-codec.jar:lib/batik/batik-dom.jar:lib/batik/batik-ext.jar:lib/batik/batik-svggen.jar:lib/batik/batik-util.jar:lib/batik/batik-xml.jar:lib/commons-lang-2.6.jar:lib/commons-net-2.2.jar:. uk.ac.sanger.artemis.components.ActMain </COMMAND> </PARA> </SECT1> diff --git a/docs/feature_edit.gif b/docs/feature_edit.gif index a31014b869c0dca960a92b334975f26e20d8150e..3b46dab3f8cee1fb69021d2fcd67db89b15111f1 100644 Binary files a/docs/feature_edit.gif and b/docs/feature_edit.gif differ diff --git a/docs/jvm_options.sgml b/docs/jvm_options.sgml index 242ae1fa2f603265a42a7b498a302a41971451e6..65dde42851e085b37b58c39e49611f2aed027e1e 100644 --- a/docs/jvm_options.sgml +++ b/docs/jvm_options.sgml @@ -99,6 +99,29 @@ first (top) sequence in ACT: </SECT2> ]]> + <SECT2 ID="JVM-SHOW-SNPS"> + <TITLE><LITERAL>-Dshow_snps</LITERAL></TITLE> + <PARA> +Show SNP marks in BAM panels. +</PARA> + </SECT2> + + <SECT2 ID="JVM-SHOW-SNPS-PLOT"> + <TITLE><LITERAL>-Dshow_snp_plot</LITERAL></TITLE> + <PARA> +Automatically open SNP plots for BAM files that are opened. +</PARA> + </SECT2> + + + <SECT2 ID="JVM-SHOW-COV-PLOT"> + <TITLE><LITERAL>-Dshow_cov_plot</LITERAL></TITLE> + <PARA> +Automatically open coverage plots for BAM files that are opened. +</PARA> + </SECT2> + + <SECT2 ID="JVM-CHADO"> <TITLE><LITERAL>-Dchado="hostname:port/database?username"</LITERAL></TITLE> <PARA> diff --git a/docs/main_window_chapter.sgml b/docs/main_window_chapter.sgml index b670839d26bd333cc2b22531f80893508648eb73..7dc2bee94c0f6a3e6051ded94b8bd94adb913a9a 100644 --- a/docs/main_window_chapter.sgml +++ b/docs/main_window_chapter.sgml @@ -265,5 +265,6 @@ menu items which allow the maximum window size to be set. </PARA> </SECT1> +&validator; &mousebuttons; </CHAPTER> diff --git a/docs/manual.sgml b/docs/manual.sgml index 3ce768f8da3f08f5338fd7c529f4472424cad863..1e1f57c36eab1ab7411075678b05e32603bc178c 100644 --- a/docs/manual.sgml +++ b/docs/manual.sgml @@ -21,6 +21,7 @@ <!ENTITY views-directedit SYSTEM "views_directedit.sgml"> <!ENTITY featurelist SYSTEM "feature_list.sgml"> <!ENTITY mousebuttons SYSTEM "mousebuttons.sgml"> +<!ENTITY validator SYSTEM "validator.sgml"> <!ENTITY gettingjava SYSTEM "getting_java.sgml"> <!ENTITY unixargs SYSTEM "unix_args.sgml"> <!ENTITY jvmopts SYSTEM "jvm_options.sgml"> diff --git a/docs/menus.sgml b/docs/menus.sgml index 204540fcbd4f2821e8f46a883a6a2f08d4218af6..21782ecc2aa694c3c39b51bd72b9be641784a1b9 100644 --- a/docs/menus.sgml +++ b/docs/menus.sgml @@ -165,11 +165,22 @@ similar effect to double clicking the middle button on a base or residue (see <TITLE>Features Overlapping Selection</TITLE> <PARA> Select those (and only those) features that overlap the currently selected -range of bases or any of the currently selected features. The current +range of bases or any of the currently selected features. The current selection will be discarded. </PARA> </SECT2> + + <SECT2 ID="SELECTMENU-WITHIN-SELECTION"> + <TITLE>Features Within Selection</TITLE> + <PARA> +Select those (and only those) features that are fully contained by the currently +selected range of bases or any of the currently selected features. The current +selection will be discarded. + </PARA> + </SECT2> + + <SECT2 ID="SELECTMENU-BASE-RANGE"> <TITLE>Base Range ...</TITLE> <PARA> @@ -535,6 +546,16 @@ LINKEND="GRAPHS">. Configuration options for graphs are described in <XREF LINKEND="OPTIONS-PLOTS">. </PARA> </SECT2> + +<![ %act-only; [ + <SECT2 ID="VIEWMENU-ADJUST-HEIGHTS"> + <TITLE>Adjust panel heights ...</TITLE> + <PARA> +Option in ACT for adjusting the panel heights (BAM, VCF, plots, comparisons) by giving +them different weights in order to distribute the space between each component. + </PARA> + </SECT2> +]]> </SECT1> <SECT1 ID="GOTOMENU"> @@ -775,9 +796,6 @@ The feature edit window <IMAGEOBJECT> <IMAGEDATA FORMAT="gif" FILEREF="feature_edit.gif"> </IMAGEOBJECT> - <IMAGEOBJECT> - <IMAGEDATA FORMAT="eps" FILEREF="feature_edit.eps"> - </IMAGEOBJECT> </MEDIAOBJECT> </SCREENSHOT> <PARA> @@ -839,9 +857,35 @@ LINKEND="GOTOMENU-GOTO-SELECTION-START"> for more). </LISTITEM> <LISTITEM> <PARA> -The <LITERAL>Select Feature</LITERAL> button selects this feature (in the same -way as clicking on the feature in one of the views). +The <LITERAL>User Qualifiers</LITERAL> button opens a tool for maintaining +user defined lists of qualifiers (i.e. qualifiers in the form tag = value pairs +on separate lines) and the option to read qualifiers from <ULINK +URL="http://www.geneontology.org/GO.format.shtml" TYPE="external">OBO</ULINK> formatted files or +URLs. In the intial screen (see below) you are invited to import your qualifier list from the import +options in the "File" menu. These lists can be optionally saved between sessions in the file +'.artemis.qualifiers' in the home directory. </PARA> + <MEDIAOBJECT> + <IMAGEOBJECT> + <IMAGEDATA FORMAT="gif" FILEREF="qualifier_list.gif"> + </IMAGEOBJECT> + </MEDIAOBJECT> + + <PARA> +When a qualifier list or OBO file has been added then it is possible to search for +keywords within a list. The qualifer selected in the drop down list (under the SEARCH button) +can then be added to the current feature annotation or added to selected features in &prog;. +If the keywords text field is left blank then all qualifiers are available from the drop +down list of qualifier values. + </PARA> + + <MEDIAOBJECT> + <IMAGEOBJECT> + <IMAGEDATA FORMAT="gif" FILEREF="qualifier_list2.gif"> + </IMAGEOBJECT> + </MEDIAOBJECT> + + </LISTITEM> </ITEMIZEDLIST> </LISTITEM> diff --git a/docs/qualifier_list.gif b/docs/qualifier_list.gif new file mode 100644 index 0000000000000000000000000000000000000000..3bcd2f0cdbd99bfa2d21e14cf856e0f2bdbab25a Binary files /dev/null and b/docs/qualifier_list.gif differ diff --git a/docs/qualifier_list2.gif b/docs/qualifier_list2.gif new file mode 100644 index 0000000000000000000000000000000000000000..c963b159ac03f87ace73f7ebd642eadb6a0ac6d7 Binary files /dev/null and b/docs/qualifier_list2.gif differ diff --git a/docs/start_chapter.sgml b/docs/start_chapter.sgml index 42d645dc0a25cc2a072f1bc1a47f35b2768890be..ffb0367fac1c85cad18812aa76dd903796a656d8 100644 --- a/docs/start_chapter.sgml +++ b/docs/start_chapter.sgml @@ -66,7 +66,7 @@ cd ~/artemis <PARA> <COMMAND> -java -classpath lib/biojava.jar:lib/jemAlign.jar:lib/j2ssh/j2ssh-core.jar:lib/ibatis/ibatis-2.3.4.726.jar:lib/ibatis/log4j-1.2.14.jar:lib/chado-14-interface.jar:lib/postgresql-8.4-701.jdbc3.jar:lib/picard.jar:lib/picard/sam.jar:lib/batik/batik-awt-util.jar:lib/batik/batik-codec.jar:lib/batik/batik-dom.jar:lib/batik/batik-ext.jar:lib/batik/batik-svggen.jar:lib/batik/batik-util.jar:lib/batik/batik-xml.jar:. -Dartemis.environment=UNIX uk.ac.sanger.artemis.components.ArtemisMain +java -mx500m -ms100m -classpath lib/biojava.jar:lib/jemAlign.jar:lib/j2ssh/j2ssh-core.jar:lib/ibatis/ibatis-2.3.4.726.jar:lib/ibatis/log4j-1.2.14.jar:lib/ibatis/cglib-nodep-2.2.jar:lib/postgresql-8.4-701.jdbc3.jar:lib/picard.jar:lib/picard/sam.jar:lib/batik/batik-awt-util.jar:lib/batik/batik-codec.jar:lib/batik/batik-dom.jar:lib/batik/batik-ext.jar:lib/batik/batik-svggen.jar:lib/batik/batik-util.jar:lib/batik/batik-xml.jar:lib/commons-lang-2.6.jar:lib/commons-net-2.2.jar:. -Dartemis.environment=UNIX uk.ac.sanger.artemis.components.ArtemisMain </COMMAND> </PARA> </SECT1> diff --git a/docs/tick.png b/docs/tick.png new file mode 100644 index 0000000000000000000000000000000000000000..9bf53b96bef1b0c7db034241a70e0f8db1a0173a Binary files /dev/null and b/docs/tick.png differ diff --git a/docs/unix_args.sgml b/docs/unix_args.sgml index 4b996dfa4ee599cf91a36ca1d0c99fe928fea9b2..68c37c2019050a73c87bdd3a3e9a2d1154f98ed7 100644 --- a/docs/unix_args.sgml +++ b/docs/unix_args.sgml @@ -5,14 +5,6 @@ As well as the listing file names on the command line, the following switches are available to UNIX users: </PARA> - <SECT2 ID="UNIXARGS-QUIET"> - <TITLE><LITERAL>-quiet</LITERAL></TITLE> - <PARA> -This option tells &prog; to suppress normal informational messages while -running. - </PARA> - </SECT2> - <SECT2 ID="UNIXARGS-OPTIONS"> <TITLE><LITERAL>-options</LITERAL></TITLE> <PARA> diff --git a/docs/validation_report.png b/docs/validation_report.png new file mode 100644 index 0000000000000000000000000000000000000000..ab379078da4a6655f30d90ee1d73a5a1435fd1c8 Binary files /dev/null and b/docs/validation_report.png differ diff --git a/docs/validator.sgml b/docs/validator.sgml new file mode 100644 index 0000000000000000000000000000000000000000..f2a8ff120c3a0b2cfbe4cd6c55c60e93b19e0461 --- /dev/null +++ b/docs/validator.sgml @@ -0,0 +1,181 @@ + <SECT1 ID="VALIDATOR"> + <TITLE>Annotation Validation</TITLE> + +<SECT2 ID="VALIDATOR-RUN"> + <TITLE>How to Run Validation Checks</TITLE> + <PARA> +&prog; can carry out validations checks to try and minimise annotation errors. +These checks can be carried out in the following ways: + </PARA> +<ORDEREDLIST ID="VALID-CHECK"> + <LISTITEM ID="VALID-CHECK-1"> + <PARA> +Click on the tick button + +<inlinemediaobject> + <imageobject> + <imagedata fileref="tick.png"> + </imageobject> +</inlinemediaobject> + +found in the top right hand side of Artemis to validate all features. When complete it will +open a report window highlighting any features which have failed the checks. + + </PARA> + </LISTITEM> + <LISTITEM ID="VALID-CHECK-2"> + <PARA> +Select the features to be checked in &prog; and open the popup menu by right clicking on the feature display +and selecting the 'Validation report ...' option. + </PARA> + </LISTITEM> + + <LISTITEM ID="VALID-CHECK-3"> + <PARA> +From the View menu, select the 'Feature Filters' menu item and the 'Validation checks...' option. This opens +a feature list window for each of the type of check it carries out and these contain the features that have +failed the check. + </PARA> + </LISTITEM> + <LISTITEM ID="VALID-CHECK-4"> + <PARA> +For organisms in a chado database the vaidator can be run from the 'Database and File Manager' window from the +'File' menu by selecting the 'Validate Selected Sequence / Organism' option. + </PARA> + </LISTITEM> +</ORDEREDLIST> +</SECT2> + +<SECT2 ID="VALIDATOR-CHECKS-ALL"> + <TITLE>Validation Checks For All File Types</TITLE> + <PARA> +The following checks are made on all file types (e.g. EMBL, GFF3): + </PARA> + +<ITEMIZEDLIST SPACING="compact"> + <LISTITEM> + <PARA> +CDS have no internal stop codon + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +CDS have a valid stop codon + </PARA> + </LISTITEM> +</ITEMIZEDLIST> + + <PARA> +Additionally &prog; checks GO annotation for: + </PARA> + +<ITEMIZEDLIST SPACING="compact"> + <LISTITEM> + <PARA> +unexpected white space in with/from and dbxref columns + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +the WITH/FROM field must be empty when using IDA, NAS, ND, TAS or EXP evidence code + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +GO:0005515 can only have IPI evidence code + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +IEP is not allowed for molecular_function and cellular_component terms + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +the WITH/FROM field must be filled when using ISS, ISA, ISO and ISM codes + </PARA> + </LISTITEM> +</ITEMIZEDLIST> +</SECT2> + +<SECT2 ID="VALIDATOR-CHECKS-GFF"> + <TITLE>Validation Checks For GFF3</TITLE> + + <PARA> +The following are checks for GFF3 and Chado entries only: + </PARA> + +<ITEMIZEDLIST SPACING="compact"> + <LISTITEM> + <PARA> +check that the gene model comprises of at least a gene and a transcript feature + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +check that the boundaries of the features making up a gene model are consistent + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +check that all the features in a gene model are on the same strand + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +check that CDS features have a phase + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +check the attribute column to ensure that qualifiers have a value (not empty) and +that only reserved tags start with an uppercase character + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +check that partial qualifiers are consistent within a gene model + </PARA> + </LISTITEM> + <LISTITEM> + <PARA> +check that the gene name prefix is consistent within a gene model + </PARA> + </LISTITEM> +</ITEMIZEDLIST> + +</SECT2> + +<SECT2 ID="VALIDATOR-REPORT"> + <TITLE>Validation Report</TITLE> + + <PARA> +The validation report window displays a summary for the features that have failed one or +more of the annotation checks above. The title bar of the window displays the number of +features that have passed and the number that have failed the validation checks. The +problems identified are highlighted in red. + </PARA> + + <PARA> +<MEDIAOBJECT> + <IMAGEOBJECT> + <IMAGEDATA FORMAT="png" FILEREF="validation_report.png"></IMAGEOBJECT> + </MEDIAOBJECT> + </PARA> + + <PARA> +Some of the errors can be fixed automatically. The 'Auto-Fix' button opens a window +with the fixes enabled that are available for the entry type that is loaded in &prog;. For example, it will +attempt to fix CDS features that have been found not to end in stop codons. If the last codon is not a +stop codon, but the very next codon is a stop codon, then the end of the feature is +extended by three bases. + </PARA> + <PARA> +For GFF3 and chado entries &prog; will also attempt to fix problems it finds with gene +boundaries and if a phase is absent then a default phase of 0 is given. Once these are +fixed the results window will automatically update and remove the problems it has +managed to resolved. + </PARA> +</SECT2> + + </SECT1> diff --git a/etc/writedb_entry b/etc/writedb_entry index 12e7f55bd481f34ce6093299e205d19c2daf9f82..6fbfcb6cb4055a4dee589bd19b21543277babe45 100755 --- a/etc/writedb_entry +++ b/etc/writedb_entry @@ -28,7 +28,7 @@ done ARTEMIS_HOME=`dirname "$PRG"`/.. CLASSPATH="$ARTEMIS_HOME:$ARTEMIS_HOME/lib/biojava.jar:$ARTEMIS_HOME/lib/jemAlign.jar:$ARTEMIS_HOME/lib/jakarta-regexp-1.2.jar:$ARTEMIS_HOME/lib/macos.jar:$ARTEMIS_HOME/lib/postgresql-8.4-701.jdbc3.jar:$ARTEMIS_HOME/lib/chado-14-interface.jar:$CLASSPATH" -CLASSPATH="$CLASSPATH:$ARTEMIS_HOME/lib/commons-lang-2.6.jar" +CLASSPATH="$ARTEMIS_HOME/lib/commons-lang-2.6.jar:$CLASSPATH" # iBatis jars CLASSPATH="$CLASSPATH:$ARTEMIS_HOME/lib/ibatis/ibatis-2.3.4.726.jar:$ARTEMIS_HOME/lib/ibatis/:$ARTEMIS_HOME/lib/ibatis/log4j-1.2.14.jar:$ARTEMIS_HOME/lib/ibatis/cglib-nodep-2.2.jar:$ARTEMIS_HOME/lib/retrotranslator-runtime-1.1.0.jar" diff --git a/uk/ac/sanger/artemis/io/GFFStreamFeature.java b/uk/ac/sanger/artemis/io/GFFStreamFeature.java index bfec1da894ca1d501f6e59cf8c971b9984bae9ac..f4a0a9b441cf0644448028f0295b274584b14f50 100644 --- a/uk/ac/sanger/artemis/io/GFFStreamFeature.java +++ b/uk/ac/sanger/artemis/io/GFFStreamFeature.java @@ -892,12 +892,29 @@ public class GFFStreamFeature extends SimpleDocumentFeature implements } }; + GFF3AttributeAggregator curcomProc = new GFF3AttributeAggregator() { + @Override + public String process(StringVector values) { + StringBuilder buffer = new StringBuilder(); + if (values != null && values.size() > 0) { + for (int value_index = 0; value_index < values.size(); ++value_index) { + buffer.append(GFF3Encoder.encode(values.elementAt(value_index))); + if (value_index < (values.size()) - 1) + buffer.append(" "); + } + } + return buffer.toString(); + } + }; + // map GO -> full_GO abuf.setMapping("GO", "full_GO"); abuf.setGlue("full_GO", ","); // merge curation and comment abuf.setMapping("curation", "comment"); + abuf.setGlue("comment", " "); + abuf.setAggregator("comment", curcomProc); // also put GOs in Ontology_term abuf.setClone("full_GO", "Ontology_term"); diff --git a/uk/ac/sanger/artemis/util/DatabaseDocument.java b/uk/ac/sanger/artemis/util/DatabaseDocument.java index 6addbd4fa2b71679539867aabd4e32301bc0f5a2..f96025548a42d33a4f8cf268088ec0fe0bccb1dc 100644 --- a/uk/ac/sanger/artemis/util/DatabaseDocument.java +++ b/uk/ac/sanger/artemis/util/DatabaseDocument.java @@ -67,10 +67,12 @@ import org.postgresql.largeobject.LargeObjectManager; import com.ibatis.common.jdbc.SimpleDataSource; import java.sql.*; +import java.text.DateFormat; import java.text.SimpleDateFormat; import java.io.*; import java.net.ConnectException; import java.net.InetAddress; +import java.util.Calendar; import java.util.Collections; import java.util.Comparator; import java.util.HashSet; @@ -551,7 +553,11 @@ public class DatabaseDocument extends Document ByteBuffer entryBuffer = new ByteBuffer(); try { + DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss"); + Calendar cal = Calendar.getInstance(); + entryBuffer.append("##gff-version 3\n"); + entryBuffer.append("#created " + dateFormat.format(cal.getTime()) + "\n"); ByteBuffer sequenceBuffer = new ByteBuffer(); if(dao instanceof IBatisDAO)