Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Z developer notes

Avinash Ramu edited this page May 1, 2015 · 22 revisions

How do I create a metadata export?

To create a new export of the metadata from inside TGI:

cd /gscuser/mgriffit/
genome model export metadata id=18177dd5eca44514a47f367d9804e17a --output-path=/gscuser/mgriffit/18177dd5eca44514a47f367d9804e17a-2014.1.3.dat
mv /gscuser/mgriffit/18177dd5eca44514a47f367d9804e17a-2014.1.3.dat $STAGING_DIR/gms/testdata/GMS1/export/

How do I run the make target db-drop?

This can be useful when testing different schema dumps.

cd gms/
sudo /etc/init.d/postgresql restart
make db-drop
make db-rebuild

How do I run the perl-debugger on a GMT or genome command?

genome-perl -d -S gmt varscan somatic-filter-workflow --tumor-bam=/gscmnt/gc13001/info/build_merged_alignments/merged-alignment-blade14-3-15.gsc.wustl.edu-apipe-builder-13744-135837918/135837918.bam --normal-bam=/gscmnt/gc8001/info/build_merged_alignments/merged-alignment-blade11-4-15.gsc.wustl.edu-apipe-builder-25117-135524160/135524160.bam --outdir=/gscuser/aramu/test/ --prefix=/gscmnt/gc7007/info/genome/test_inputs/Genome-Model-Tools-VarScan-SomaticWorkflowFilter/2015-02-06/varscan.snps --reference=/gscmnt/ams1102/info/model_data/2869585698/build106942997/all_sequences.fa

How do I query the postgres tables directly ?

sudo -u postgres psql
\c genome
select * from timeline.allocation_event_type;
insert into timeline.allocation_event_type values ('invalidated');
\q

The schema of the tables is in the 'gms' repo under setup/schema.psql
postgres TIP - use singlequotes while inserting values and not double-quotes. PostgreSQL interprets " as being quotes for identifiers, ' as being quotes for strings.

##How do I look at the SQL queries generated by the genome commands ? Use UR_DBI_MONITOR_SQL, for example

UR_DBI_MONITOR_SQL=1 genome model build list

##Where is the staging directory inside TGI ? /gscmnt/sata102/info/ftp-staging/pub/software/gms

##How do I stage files onto the FTP site from TGI ?

#The location of the staging directory is likely to change often.
- Update the contents of the source/staging area: /gscmnt/sata102/info/ftp-staging/pub/software/gms/
- Touch "syncme":
   touch /gscmnt/sata102/info/ftp-staging/pub/software/gms/syncme
   watch -n1 ls -l /gscmnt/sata102/info/ftp-staging/pub/software/gms/
- Within 60 seconds, you'll see "syncme" become "syncing"
- When the rsync to the destination completes, "syncing" will be removed.
- Note that even a "No Op" sync operation takes upwards of 4 minutes for filesystem analysis.

Recall the new download location:
https://xfer.genome.wustl.edu/gxfer1/project/gms/

If you update files in gms/testdata a new tarball `GMS1.tgz` will also have to be created.

##How do I create a new meta-data dump for the Workflow db? Remove Workflow/DataSource/Meta.* and from /usr/share/perl5/Workflow/DataSource and launch a build. This should regenerate a fresh meta-data dump. Sometimes running a build might produce this error,

  74 2015-04-29 22:17:18-0500 clia1: ERROR: No schema or dump file found for /opt/gms/8VOJX98/sw/workflow/lib/Workflow/DataSource/Meta.sqlite3.
   75 2015-04-29 22:17:18-0500 clia1:   Tried schema path /opt/gms/8VOJX98/sw/workflow/lib/Workflow/DataSource/Meta.sqlite3-schema
   76 2015-04-29 22:17:18-0500 clia1:   and dump path /opt/gms/8VOJX98/sw/workflow/lib/Workflow/DataSource/Meta.sqlite3-dump
   77 2015-04-29 22:17:18-0500 clia1: If you still have *sqlite3n* SQLite database files please rename them to *sqlite3*, without the 'n' at (eval 358) line 3

The error shows up if the sqlite3 files are removed but the Meta.pm is still present. The error should be resolved if the Meta.pm is removed and a fresh build is launched. removed. Otherwise ur update classes-from-db may work to update the MetaDb. (It will also make changes to the .pm files, but you could revert those afterwards. This method has also been a bit flaky.)

Clone this wiki locally