Commit Graph
616 Commits
Author SHA1 Message Date
Daniel Blankenberg 28b89d686f Change database schema to separate Dataset and HistoryDatasetAssociation. This is a significant change, be sure to follow the migration notes exactly.
Make sure to backup your database before updating.


Also fix a long standing bug in the async controller dealing with updating output datasets upon job completion.


Credit for database migration directions go to Greg.

*** This is a significant change, be sure to follow the migration steps below exactly and in order: ***

---------------

0. Stop Galaxy server

---------------

1. Backup database and galaxy_root/database directory

---------------

2. The current validation_error table is not being used, it is left over from Ian's work that was not made functional.  However, if we want to keep it around, we should drop the old version of the table so it will get re-created correctly when the Galaxy server is restarted:

any database - sql command(s):
------------------------------
DROP TABLE validation_error;

---------------

3. Stop server, perform svn update to get latest code, start server to create new history_dataset_association and implicitly_converted_dataset_association tables

---------------

4. Add new columns to dataset table:

postgres sql command(s):
------------------------
ALTER TABLE dataset ADD COLUMN purgable boolean DEFAULT 't';
ALTER TABLE dataset ADD COLUMN external_filename text;
ALTER TABLE dataset ADD COLUMN _extra_files_path text;

mysql sql command(s):
---------------------
ALTER TABLE dataset ADD COLUMN purgable boolean DEFAULT TRUE;
ALTER TABLE dataset ADD COLUMN external_filename text;
ALTER TABLE dataset ADD COLUMN _extra_files_path text;

sqlite sql command(s):
----------------------
ALTER TABLE dataset ADD COLUMN purgable boolean DEFAULT 0;
ALTER TABLE dataset ADD COLUMN external_filename text;
ALTER TABLE dataset ADD COLUMN _extra_files_path text;

---------------

5. Populate new columns:

postgres sql command(s):
------------------------
UPDATE
dataset
SET
external_filename = dataset_filename.filename,
_extra_files_path = dataset_filename.extra_files_path
FROM
dataset_filename
WHERE
dataset.filename_id = dataset_filename.id;

mysql or sqlite sql command(s):
-------------------------------
UPDATE
dataset,
dataset_filename
SET
dataset.external_filename = dataset_filename.filename,
dataset._extra_files_path = dataset_filename.extra_files_path
WHERE
dataset.filename_id = dataset_filename.id;

---------------

6. Populate dataset table with info from dataset_child_association table:

postgres sql command(s):
------------------------
UPDATE
dataset
SET
parent_id = dataset_child_association.parent_dataset_id
FROM
dataset_child_association
WHERE
dataset.id = dataset_child_association.child_dataset_id;

mysql or sqlite sql command(s):
-------------------------------
UPDATE
dataset,
dataset_child_association
SET
dataset.parent_id = dataset_child_association.parent_dataset_id
WHERE
dataset.id = dataset_child_association.child_dataset_id;

---------------

7. Drop dataset_child_association table:

any database - sql command(s):
------------------------------
DROP TABLE dataset_child_association;

---------------

8. Copy parts of the current dataset table to the new history_dataset_association table:

postgres sql command(s):
------------------------
INSERT INTO history_dataset_association
SELECT
id,
history_id,
id AS dataset_id,
create_time,
update_time,
hid,
name,
info,
blurb,
peek,
extension,
metadata,
parent_id,
designation,
deleted,
visible
FROM dataset
ORDER BY id;

mysql or sqlite sql command(s):
-------------------------------
INSERT INTO
history_dataset_association
(
history_id,
dataset_id,
create_time,
update_time,
hid,
name,
info,
blurb,
peek,
extension,
metadata,
parent_id,
designation,
deleted,
visible
)
SELECT
history_id,
id,
create_time,
update_time,
hid,
name,
info,
blurb,
peek,
extension,
metadata,
parent_id,
designation,
deleted,
visible
FROM
dataset
ORDER BY
id;

---------------

9. Update the nextval value of the primary key sequence in the history_dataset_association table

NOTE: THIS IS NOT NECESSARY FOR MYSQL OR SQLITE!

postgres sql command(s):
------------------------
SELECT
setval('history_dataset_association_id_seq', max(id))
FROM
history_dataset_association;

---------------

10. Update dataset table to mark dataset_associated_file dataset as deleted:

postgres sql command(s):
------------------------
UPDATE dataset
SET
deleted = 't'
WHERE
id IN
(SELECT dataset_id FROM dataset_associated_file ORDER BY dataset_id DESC);

mysql or sqlite sql command(s):
-------------------------------
UPDATE dataset
SET
deleted = TRUE
WHERE
id IN
(SELECT dataset_id FROM dataset_associated_file ORDER BY dataset_id DESC);

---------------

11. Drop the dataset_associated_file table:

any database - sql command(s):
------------------------------
DROP TABLE dataset_associated_file;

---------------

12. Alter foreign keys on job_to_input_dataset table:

postgres or sqlite sql command(s):
------------------------
ALTER TABLE
job_to_input_dataset
DROP CONSTRAINT
job_to_input_dataset_dataset_id_fkey;

ALTER TABLE
job_to_input_dataset
ADD CONSTRAINT job_to_input_dataset_dataset_id_fkey
FOREIGN KEY
(dataset_id)
REFERENCES
history_dataset_association(id);


mysql sql command(s):
-------------------------------
ALTER TABLE
job_to_input_dataset
DROP FOREIGN KEY
ix_job_to_input_dataset_dataset_id;

ALTER TABLE
job_to_input_dataset
ADD FOREIGN KEY
ix_job_to_input_dataset_dataset_id (dataset_id)
REFERENCES
history_dataset_association(id);

---------------

13. Alter foreign keys on job_to_output_dataset table:

postgres or sqlite sql command(s):
------------------------
ALTER TABLE
job_to_output_dataset
DROP CONSTRAINT
job_to_output_dataset_dataset_id_fkey;

ALTER TABLE
job_to_output_dataset
ADD CONSTRAINT
job_to_output_dataset_dataset_id_fkey
FOREIGN KEY (dataset_id)
REFERENCES history_dataset_association(id);

mysql sql command(s):
-------------------------------
ALTER TABLE
job_to_output_dataset
DROP FOREIGN KEY
ix_job_to_output_dataset_dataset_id;

ALTER TABLE
job_to_output_dataset
ADD FOREIGN KEY
ix_job_to_output_dataset_dataset_id
FOREIGN KEY (dataset_id)
REFERENCES history_dataset_association(id);

---------------

14. Eliminate columns from the dataset table previously copied to history_dataset_association:

any database - sql command(s):
------------------------------
ALTER TABLE dataset DROP COLUMN hid;
ALTER TABLE dataset DROP COLUMN history_id;
ALTER TABLE dataset DROP COLUMN name;
ALTER TABLE dataset DROP COLUMN info;
ALTER TABLE dataset DROP COLUMN blurb;
ALTER TABLE dataset DROP COLUMN peek;
ALTER TABLE dataset DROP COLUMN extension;
ALTER TABLE dataset DROP COLUMN dbkey;
ALTER TABLE dataset DROP COLUMN metadata;
ALTER TABLE dataset DROP COLUMN parent_id;
ALTER TABLE dataset DROP COLUMN designation;
ALTER TABLE dataset DROP COLUMN visible;
ALTER TABLE dataset DROP COLUMN filename_id;
2008-07-09 17:41:08 +00:00
Anton Nekrutenko 49c8e44bee typo 2008-07-07 15:17:32 +00:00
Guruprasad Anada 255fee9ba8 Added new option to Grouping tool to randomly pick an entry from a chosen column.
Also corrected a typo in concatenate tool.
2008-07-03 17:48:28 +00:00
Guruprasad Anada 4c520e8ce2 Rewrote "convert delimiters to tab" tool in python.
Modified "Concatenate queries tail-to-head" tool to include multiple queries.
2008-07-02 19:43:08 +00:00
Greg Von Kuster f931001667 Added more information to the sample .loc files, fixed a typo in extract genomic dna tool. 2008-06-30 18:02:53 +00:00
Anton Nekrutenko bb59d8a00d long overdue join wrapper fix. Needs to be rewritten in python down the road 2008-06-25 16:27:17 +00:00
Daniel Blankenberg d96c1cd065 Minor performance enhancement for anotation profiler summaries. 2008-06-24 15:11:19 +00:00
Greg Von Kuster 2b4df13a23 Grouping tool version updateed due to tool behvioral change. Also do not read entire fatsa / fastq dataset twice to create blurb. 2008-06-12 12:20:41 +00:00
Guruprasad Anada 36eaa51b9b Changed display of decimal numbers in the output. 2008-06-11 19:15:46 +00:00
Nate Coraor 66cbefc09c Use the more recent POSIX standard '-k 1...' option to *nix sort rather
than the obsolete POSIX standard '+0'.
2008-06-11 19:13:19 +00:00
Greg Von Kuster 666de20b4d Cleanup for fastqsolexa data type converters. We are currently supporting only the Solexa variant and will add support for other variants when the formats stabilize. 2008-06-09 20:15:04 +00:00
Greg Von Kuster 9f46fd2098 Fixes for column maker, columns and column_types tabular metadata elements are now used, no more memory errors. Also corrected some syntax / examples text for filtering tool. 2008-06-09 20:10:14 +00:00
Greg Von Kuster 74da99d8f2 Fix a typo in Chromatin and Chromosomes exec_after_process hook. 2008-06-09 17:13:38 +00:00
Guruprasad Anada f27ef3634f Changing liftOver input from BED to Interval in order to preserve the contents of columns other than the chromosome, start and end columns. This information was previously being lost during Interval to BED conversion. 2008-06-08 19:28:45 +00:00
Wen-Yu Chung 782d7db6be Update fastq format.
Now we only support FastqSolexa variants.
If the quality scores are presented as characters,
the integer values are obtained by their ascii code subtract 64.
2008-06-06 18:52:11 +00:00
Greg Von Kuster e767816519 Fix fastq_to_qual_converter to use 33 as default rather than 64 - now the same as fastq_to_fasta_qual tool. Added fastqsolexa as additional format for fastq converters. 2008-06-06 14:53:19 +00:00
Daniel Blankenberg 70b22fbc60 All datasets are now properly wrapped by DatasetFilenameWrapper. Certain cases had some datasets wrapped by InputValueWrapper. 2008-06-05 18:52:26 +00:00
Daniel Blankenberg abd78d076a Fix drill down parameter function in workflow. 2008-06-04 16:32:05 +00:00
Greg Von Kuster 04e0834500 Revert 2715. 2008-06-04 13:02:15 +00:00
Greg Von Kuster dedc7278a1 Requires config change, temporary files are now created in a configurable location - affects many tools. 2008-06-03 20:29:54 +00:00
Daniel Blankenberg 86f0862aa4 Move ucsc and gbrowse data from static to tool-data/shared.
Cron scripts on test and main will need to be updated when the server is.

GOPS complement tool and annotation profiler will now correctly use chromosome lengths files if available.
2008-06-03 18:53:26 +00:00
Wen-Yu Chung c678067ae1 Negative values should be recognized as integers not characters. 2008-05-31 04:06:43 +00:00
Daniel Blankenberg 9b36a7ae0e Add descriptions to dynamic options filters. 2008-05-30 16:58:15 +00:00
Greg Von Kuster 097a879588 Forgot to fix the comments when I fixed the tool behavior. 2008-05-29 20:45:41 +00:00
Greg Von Kuster b1308a3c62 Some clarification / fixes for FastqSolexa - our convert tool currently only supports the Solexa variant if the quality scores are integer ( not ASCII ). This probably needs to be looked at! 2008-05-29 20:41:14 +00:00
Greg Von Kuster 1a23f9e55d Requires config modification - Add Fastq sniffer, add support for fastqsolexa data type, rename convert_fatsq2fasta tool to be fastq_to_fasta_qual, add functional tests for both fastq and fastqsolexa data types, misc code cleanup. 2008-05-29 19:12:36 +00:00
Daniel Blankenberg 11a2c767c3 Rewrite of dynamic options for select lists. There are no more 'special cases' and new filters are much easier to incorporate, as neeeded.
MAF tool interfaces now support the use of index species and all species existing in cached alignment sets.
Until main is updated and the old maf_location files can be overwritten, these symbolic links are required:
maf_index.loc -> /depot/data2/galaxy/maf_index_new.loc
maf_pairwise.loc -> /depot/data2/galaxy/maf_pairwise_new.loc
2008-05-29 17:38:46 +00:00
Wen-Yu Chung 836537114d switch the output formats of the fastq converter. 2008-05-28 21:38:32 +00:00
Greg Von Kuster 711af7a4f2 Fix for sniffing datatypes, sniff order is now retrieved from app.datatypes_registry rather than the default sniff_order list in the Registry class. 2008-05-28 21:20:15 +00:00
Greg Von Kuster 57fe2ba4b0 Cleaned up lav_to_bed a bit, added functional test. Removed old, unused tools from the ~/tools/filter directory. 2008-05-28 19:26:42 +00:00
Wen-Yu Chung 64c6604f40 Now the tool can handle empty quality score title. 2008-05-28 16:12:40 +00:00
Greg Von Kuster f7806342fc Requires change to Galaxy config - fixed the way the File Format select list in the upload tool is dynamically generated, now retrieved from the upload_file_formats in app.registry.
Fixed all references to 'qualityscore' file extensions to be 'qual', since that is the extension in the QualityScore class.
Added functional test to the fastq2fasta converter.
2008-05-28 16:01:29 +00:00
Greg Von Kuster 051dc9ca94 A bit of cleanup, added FASTQ to FASTA converted to tool_conf.xml.sample. 2008-05-27 19:59:33 +00:00
Greg Von Kuster 84c5c4387d Add support ( sans sniffer ) for FASTQ data type. 2008-05-27 19:25:54 +00:00
Wen-Yu Chung 50e24553ae generate png file instead of pdf file in short read distribution tool.
add a fastq converting tool.
2008-05-27 18:51:34 +00:00
Daniel Blankenberg fbcb5b6220 Typo in GMAJ no warn. 2008-05-27 15:32:53 +00:00
Greg Von Kuster 8cf64e6a52 Bug fixes, miscellaneous cleanup for flanking_features, windowSplitter, quality_filter, featureCounter, get_flanks. 2008-05-27 14:28:49 +00:00
Greg Von Kuster fab2f2dcca Corrected the way we handle exceptions in the gops tools when building / using bitsets dictionaries. Added several new functional tests. 2008-05-23 20:43:20 +00:00
Daniel Blankenberg 6859f36c8c Update nowarn Options for GMAJ tool. 2008-05-23 20:38:01 +00:00
Daniel Blankenberg 999a5d4b19 Add additional output to annotation profiler. 2008-05-23 20:16:38 +00:00
Daniel Blankenberg 69116c95b1 Add additional nowarn parameter options to GMAJ. 2008-05-22 17:20:09 +00:00
Daniel Blankenberg 094790f164 Add more information to the Annotation Profiler output. 2008-05-22 16:40:57 +00:00
Greg Von Kuster 662c5708f8 Fix for extract genomic dna tool, check for null path string prior to checking if path exists. No longer throws exception. 2008-05-22 14:04:16 +00:00
Daniel Blankenberg 8c5787f21d Fix Errors reported by Cathy regarding the GMAJ tool.
With these notes:

User's can now specify the warnings that they which to report ('nowarns').  There are likely more options but they are unknown.

Using Firefox 1.5.0.12 on Ubuntu with no extensions/addons installed gives me no issues with loading the applet while Javascript is enabled or disabled (works for me).
2008-05-20 19:54:12 +00:00
Daniel Blankenberg 8dbd35176f Small fixes for GMAJ. 2008-05-16 19:01:09 +00:00
Daniel Blankenberg 310911f861 Update GMAJ to the latest beta.
GMAJ can now export MAF blocks back into the user's history.

The Interface for defining annotations has been updated.
2008-05-16 18:39:41 +00:00
Greg Von Kuster 8f944ef045 Changed URL for communicating with elegans server. 2008-05-16 12:15:04 +00:00
Greg Von Kuster b0a4a72315 Eliminate hack in tool_runner for gbrowse. 2008-05-15 19:51:21 +00:00
Greg Von Kuster c424782fb4 More fixes for GBrowse / GMOD communication, tool now includes command line, display in GBrowse links now functional. 2008-05-15 18:46:51 +00:00
Greg Von Kuster 3f9afc5281 Fixes for GBrowse communication. 2008-05-15 13:38:31 +00:00