Changeset 955:be728f043856
- Timestamp:
- 02/06/08 14:17:02
(1 year ago)
- Author:
- Guruprasad Anada <gua110@bx.psu.edu>
- branch:
- default
- convert_revision:
- svn:9bcadc22-80f8-0310-8a53-c8f022958886/galaxy/trunk@2311
- Message:
Modified Lift-Over tool. The "TO" build-list will now be dynamically generated based on the input dataset's build.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r890 |
r955 |
|
| 509 | 509 | except: |
|---|
| 510 | 510 | d[ fields[ name_col ] ] = [ fields[ value_col ] ] |
|---|
| 511 | | elif self.data_file == 'regions.loc' or self.data_file == 'phastOdds.loc' or self.data_file == 'binned_scores.loc': |
|---|
| | 511 | elif self.data_file == 'regions.loc' or self.data_file == 'phastOdds.loc' or self.data_file == 'binned_scores.loc' or self.data_file == 'liftOver.loc': |
|---|
| 512 | 512 | if not fields[ build_col ] in d: |
|---|
| 513 | 513 | d[ fields[ build_col ] ] = [] |
|---|
| … | … | |
| 541 | 541 | for val in d[ build ]: |
|---|
| 542 | 542 | options.append( ( val, val, False ) ) |
|---|
| 543 | | elif self.data_file == 'regions.loc' or self.data_file == 'phastOdds.loc' or self.data_file == 'binned_scores.loc': |
|---|
| | 543 | elif self.data_file == 'regions.loc' or self.data_file == 'phastOdds.loc' or self.data_file == 'binned_scores.loc' or self.data_file == 'liftOver.loc': |
|---|
| 544 | 544 | if build in d: |
|---|
| 545 | 545 | for (key, val) in d[ build ]: |
|---|
| r948 |
r955 |
|
| 21 | 21 | <tool file="encode/random_intervals.xml" /> |
|---|
| 22 | 22 | </section> |
|---|
| 23 | | <!-- |
|---|
| 24 | | TODO: uncomment when ready for main |
|---|
| 25 | | <section name="LiftOver" id="liftOver"> |
|---|
| | 23 | <section name="Lift-Over" id="liftOver"> |
|---|
| 26 | 24 | <tool file="extract/liftOver_wrapper.xml" /> |
|---|
| 27 | 25 | </section> |
|---|
| 28 | | --> |
|---|
| 29 | 26 | <section name="Text Manipulation" id="textutil"> |
|---|
| 30 | 27 | <tool file="filters/fixedValueColumn.xml" /> |
|---|
| r944 |
r955 |
|
| 25 | 25 | <tool file="encode/random_intervals.xml" /> |
|---|
| 26 | 26 | </section> |
|---|
| 27 | | <section name="LiftOver" id="liftOver"> |
|---|
| | 27 | <section name="Lift-Over" id="liftOver"> |
|---|
| 28 | 28 | <tool file="extract/liftOver_wrapper.xml" /> |
|---|
| 29 | 29 | </section> |
|---|
| r879 |
r955 |
|
| 1 | 1 | #!/usr/bin/env python2.4 |
|---|
| 2 | | #Guru |
|---|
| | 2 | #Guruprasad Ananda |
|---|
| 3 | 3 | """ |
|---|
| 4 | 4 | Converts coordinates from one build/assembly to another using liftOver binary and mapping files downloaded from UCSC. |
|---|
| … | … | |
| 26 | 26 | stop_err("Please specify a build for the output dataset using the 'To' dropdown menu.") |
|---|
| 27 | 27 | |
|---|
| 28 | | #Check if the apping file exists |
|---|
| | 28 | #Check if the Mapping file exists |
|---|
| 29 | 29 | #example file path: hg18ToHg17.over.chain |
|---|
| 30 | | mapfilename = in_dbkey + "To" + out_dbkey[0].capitalize() + out_dbkey[1:] + ".over.chain" |
|---|
| | 30 | mapfilename = in_dbkey + "To" + out_dbkey[0].upper() + out_dbkey[1:] + ".over.chain" |
|---|
| 31 | 31 | mapfilepath = "/depot/data2/galaxy/" + in_dbkey + "/liftOver/" + mapfilename |
|---|
| 32 | 32 | try: |
|---|
| r879 |
r955 |
|
| 3 | 3 | <command interpreter="python">liftOver_wrapper.py $input "$out_file1" "$out_file2" $dbkey $to_dbkey</command> |
|---|
| 4 | 4 | <inputs> |
|---|
| 5 | | <param format="bed" name="input" type="data" label="Convert coordinates of"/> |
|---|
| 6 | | <param name="to_dbkey" type="genomebuild" label="To" /> |
|---|
| | 5 | <param format="bed" name="input" type="data" label="Convert co-ordinates of" /> |
|---|
| | 6 | <param name="to_dbkey" type="select" label="To"> |
|---|
| | 7 | <options from_file="/depot/data2/galaxy/liftOver.loc"> |
|---|
| | 8 | <filter type="data_meta" data_ref="input" key="build" /> |
|---|
| | 9 | <filter type="column" name="build_col" value="0" /> |
|---|
| | 10 | <filter type="column" name="name_col" value="1" /> |
|---|
| | 11 | <filter type="column" name="value_col" value="1" /> |
|---|
| | 12 | </options> |
|---|
| | 13 | </param> |
|---|
| 7 | 14 | </inputs> |
|---|
| 8 | 15 | <outputs> |
|---|
| … | … | |
| 26 | 33 | Make sure that the genome build is specified for the input dataset (click the pencil icon if it is not specified). |
|---|
| 27 | 34 | |
|---|
| | 35 | .. class:: warningmark |
|---|
| | 36 | |
|---|
| | 37 | The tool will fail to run when the value in the **To** box is **unspecified**. This means that either we don't carry any liftover mappings corresponding to the genome build of the chosen input dataset or the genome build for the input dataset is not specified (click the pencil icon if it is not specified). |
|---|
| | 38 | |
|---|
| 28 | 39 | ----- |
|---|
| | 40 | |
|---|
| | 41 | .. class:: infomark |
|---|
| 29 | 42 | |
|---|
| 30 | 43 | **What it does** |
|---|
| 31 | 44 | |
|---|
| 32 | | This tool converts genome coordinates and annotation files between assemblies and genomes. It outputs 2 files, one containing all the mapped coordinates and one containing the unmapped coordinates (if any). |
|---|
| | 45 | This tool converts genome coordinates and annotation files between assemblies and genomes. It outputs 2 files, one containing all the mapped coordinates and the other containing the unmapped coordinates (if any). |
|---|
| 33 | 46 | |
|---|
| 34 | 47 | ----- |
|---|