commit/galaxy-central: 2 new changesets
2 new changesets in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/94e63070cbb1/ changeset: 94e63070cbb1 user: fubar date: 2011-07-06 01:44:56 summary: Backed out changeset 48bbe32beefe which introduced a whole bunch of unintended reversions from a broken hg repository This is a backout of commit 5765 affected #: 250 files (5.2 KB) --- a/lib/galaxy/security/__init__.py Tue Jul 05 12:40:43 2011 +1000 +++ b/lib/galaxy/security/__init__.py Wed Jul 06 09:44:56 2011 +1000 @@ -1005,8 +1005,7 @@ ucsc_main = ( 'hgw1.cse.ucsc.edu', 'hgw2.cse.ucsc.edu', 'hgw3.cse.ucsc.edu', 'hgw4.cse.ucsc.edu', 'hgw5.cse.ucsc.edu', 'hgw6.cse.ucsc.edu', 'hgw7.cse.ucsc.edu', 'hgw8.cse.ucsc.edu' ), ucsc_test = ( 'hgwdev.cse.ucsc.edu', ), - ucsc_archaea = ( 'lowepub.cse.ucsc.edu', ), - ucsc_bhri = ('ucsc.omics.bhri.internal','galaxy.omics.bhri.internal'), + ucsc_archaea = ( 'lowepub.cse.ucsc.edu', ) ) def __init__( self, model, permitted_actions=None ): self.model = model @@ -1037,7 +1036,7 @@ # We're going to search in order, but if the remote site is load # balancing their connections (as UCSC does), this is okay. try: - if socket.gethostbyname( server ) == addr or server == '127.0.0.1' or server == '172.16.0.38': + if socket.gethostbyname( server ) == addr: break # remote host is in the server list except ( socket.error, socket.gaierror ): pass # can't resolve, try next --- a/lib/galaxy/tools/__init__.py Tue Jul 05 12:40:43 2011 +1000 +++ b/lib/galaxy/tools/__init__.py Wed Jul 06 09:44:56 2011 +1000 @@ -922,8 +922,6 @@ if not self.check_values: return for input in self.inputs.itervalues(): - if input.name not in value: - value[input.name] = input.get_initial_value( None, value ) if isinstance( input, ToolParameter ): callback( "", input, value[input.name] ) else: --- a/lib/galaxy/tools/parameters/basic.py Tue Jul 05 12:40:43 2011 +1000 +++ b/lib/galaxy/tools/parameters/basic.py Wed Jul 06 09:44:56 2011 +1000 @@ -748,6 +748,9 @@ # Dependency on a value that does not yet exist if isinstance( dep_value, RuntimeValue ): return True + #dataset not ready yet + if hasattr( self, 'ref_input' ) and isinstance( dep_value, self.tool.app.model.HistoryDatasetAssociation ) and ( dep_value.is_pending or not isinstance( dep_value.datatype, self.ref_input.formats ) ): + return True # Dynamic, but all dependenceis are known and have values return False def get_initial_value( self, trans, context ): @@ -878,6 +881,7 @@ self.force_select = string_as_bool( elem.get( "force_select", True )) self.accept_default = string_as_bool( elem.get( "accept_default", False )) self.data_ref = elem.get( "data_ref", None ) + self.ref_input = None self.default_value = elem.get( "default_value", None ) self.is_dynamic = True def from_html( self, value, trans=None, context={} ): @@ -973,7 +977,7 @@ if not dataset.metadata.columns: # Only allow late validation if the dataset is not yet ready # (since we have reason to expect the metadata to be ready eventually) - if dataset.is_pending: + if dataset.is_pending or not isinstance( dataset.datatype, self.ref_input.formats ): return True # No late validation return False @@ -1353,7 +1357,7 @@ selected = ( value and ( hda in value ) ) field.add_option( "%s: %s" % ( hid, hda_name ), hda.id, selected ) else: - target_ext, converted_dataset = hda.find_conversion_destination( self.formats, converter_safe = self.converter_safe( other_values, trans ) ) + target_ext, converted_dataset = hda.find_conversion_destination( self.formats ) if target_ext: if converted_dataset: hda = converted_dataset @@ -1402,13 +1406,22 @@ pass #no valid options def dataset_collector( datasets ): def is_convertable( dataset ): - target_ext, converted_dataset = dataset.find_conversion_destination( self.formats, converter_safe = self.converter_safe( context, trans ) ) + target_ext, converted_dataset = dataset.find_conversion_destination( self.formats ) if target_ext is not None: return True return False for i, data in enumerate( datasets ): - if data.visible and not data.deleted and data.state not in [data.states.ERROR, data.states.DISCARDED] and ( isinstance( data.datatype, self.formats) or is_convertable( data ) ): - if self.options and self._options_filter_attribute( data ) != filter_value: + if data.visible and not data.deleted and data.state not in [data.states.ERROR, data.states.DISCARDED]: + is_valid = False + if isinstance( data.datatype, self.formats ): + is_valid = True + else: + target_ext, converted_dataset = data.find_conversion_destination( self.formats ) + if target_ext: + is_valid = True + if converted_dataset: + data = converted_dataset + if not is_valid or ( self.options and self._options_filter_attribute( data ) != filter_value ): continue most_recent_dataset[0] = data # Also collect children via association object --- a/lib/galaxy/web/framework/middleware/remoteuser.py Tue Jul 05 12:40:43 2011 +1000 +++ b/lib/galaxy/web/framework/middleware/remoteuser.py Wed Jul 06 09:44:56 2011 +1000 @@ -36,7 +36,6 @@ """ UCSC_MAIN_SERVERS = ( - 'omics.bhri.internal', 'hgw1.cse.ucsc.edu', 'hgw2.cse.ucsc.edu', 'hgw3.cse.ucsc.edu', @@ -50,7 +49,6 @@ 'lowepub.cse.ucsc.edu', ) - class RemoteUser( object ): def __init__( self, app, maildomain=None, ucsc_display_sites=[], admin_users=[] ): self.app = app @@ -58,7 +56,7 @@ self.allow_ucsc_main = False self.allow_ucsc_archaea = False self.admin_users = admin_users - if 'main' in ucsc_display_sites or 'test' in ucsc_display_sites or 'bhri' in ucsc_display_sites: + if 'main' in ucsc_display_sites or 'test' in ucsc_display_sites: self.allow_ucsc_main = True if 'archaea' in ucsc_display_sites: self.allow_ucsc_archaea = True --- a/scripts/cleanup_datasets/purge_libraries.sh Tue Jul 05 12:40:43 2011 +1000 +++ b/scripts/cleanup_datasets/purge_libraries.sh Wed Jul 06 09:44:56 2011 +1000 @@ -1,5 +1,4 @@ #!/bin/sh cd `dirname $0`/../.. -#python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log -python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 2 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log +python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log --- a/tool-data/shared/ucsc/ucsc_build_sites.txt Tue Jul 05 12:40:43 2011 +1000 +++ b/tool-data/shared/ucsc/ucsc_build_sites.txt Wed Jul 06 09:44:56 2011 +1000 @@ -1,6 +1,5 @@ #Harvested from http://genome.ucsc.edu/cgi-bin/das/dsn main http://genome.ucsc.edu/cgi-bin/hgTracks? priPac1,danRer4,mm9,mm8,droAna1,mm5,caeRem2,mm7,mm6,panTro1,dm3,panTro2,anoCar1,ce4,galGal3,galGal2,ce1,rn3,rn2,droMoj1,droMoj2,rn4,droYak1,droYak2,dp3,dp2,dm1,canFam1,danRer5,canFam2,danRer3,danRer2,ornAna1,ci2,ci1,tetNig1,bosTau1,bosTau3,bosTau2,equCab1,oryLat1,droAna2,droEre1,ponAbe2,rheMac2,sacCer1,droPer1,droSim1,monDom1,cb1,dm2,droSec1,strPur1,droVir2,droVir1,strPur2,sc1,xenTro1,droGri1,xenTro2,cb3,gasAcu1,caePb1,anoGam1,fr2,fr1,hg15,hg16,hg17,hg18,felCat3,apiMel2,monDom4,apiMel1,ce2 -bhri http://ucsc.omics.bhri.internal/cgi-bin/hgTracks? hg18,hg19,mm8,mm9,rn4 #Harvested from http://archaea.ucsc.edu/cgi-bin/das/dsn archaea http://archaea.ucsc.edu/cgi-bin/hgTracks? alkaEhrl_MLHE_1,shewW318,idioLoih_L2TR,sulSol1,erwiCaro_ATROSEPTICA,symbTher_IAM14863,moorTher_ATCC39073,therFusc_YX,methHung1,bradJapo,therElon,shewPutrCN32,pediPent_ATCC25745,mariMari_MCS10,nanEqu1,baciSubt,chlaTrac,magnMagn_AMB_1,chroViol,ralsSola,acidCryp_JF_5,erytLito_HTCC2594,desuVulg_HILDENBOROUG,pyrAer1,sulfToko1,shewANA3,paraSp_UWE25,geobKaus_HTA426,rhizEtli_CFN_42,uncuMeth_RCI,candBloc_FLORIDANUS,deinRadi,yersPest_CO92,saccEryt_NRRL_2338,rhodRHA1,candCars_RUDDII,burkMall_ATCC23344,eschColi_O157H7,burk383,psycIngr_37,rhodSpha_2_4_1,wolbEndo_OF_DROSOPHIL,burkViet_G4,propAcne_KPA171202,enteFaec_V583,campJeju_81_176,acidJS42,heliPylo_26695,pseuHalo_TAC125,chroSale_DSM3043,methVann1,archFulg1,neisMeni_Z2491_1,fusoNucl,vermEise_EF01_2,anabVari_ATCC29413,tropWhip_TW08_27,heliHepa,acinSp_ADP1,anapMarg_ST_MARIES,natrPhar1,haheChej_KCTC_2396,therPetr_RKU_1,neisGono_FA1090_1,colwPsyc_34H,desuPsyc_LSV54,hyphNept_ATCC15444,vibrChol1,deinGeot_DSM11300,strePyog_M1_GAS,franCcI3,salmTyph,metaSedu,lactSali_UCC118,trepPall,neisMeni_MC58_1,syntWolf_GOETTINGEN,flavJohn_UW101,methBoon1,haemSomn_129PT,shewLoihPV4,igniHosp1,haemInfl_KW20,haloHalo_SL1,ferrAcid1,sphiAlas_RB2256,candPela_UBIQUE_HTCC1,caldSacc_DSM8903,aerPer1,lactPlan,carbHydr_Z_2901,therTher_HB8,vibrVuln_YJ016_1,rhodPalu_CGA009,acidCell_11B,siliPome_DSS_3,therVolc1,haloWals1,rubrXyla_DSM9941,shewAmaz,nocaJS61,vibrVuln_CMCP6_1,sinoMeli,ureaUrea,baciHalo,bartHens_HOUSTON_1,nitrWino_NB_255,hypeButy1,methBurt2,polaJS66,mesoLoti,methMari_C7,caulCres,neisMeni_FAM18_1,acidBact_ELLIN345,caldMaqu1,salmEnte_PARATYPI_ATC,glucOxyd_621H,cytoHutc_ATCC33406,nitrEuro,therMari,coxiBurn,woliSucc,heliPylo_HPAG1,mesoFlor_L1,pyrHor1,methAeol1,procMari_CCMP1375,pyroArse1,oenoOeni_PSU_1,alcaBork_SK2,wiggBrev,actiPleu_L20,lactLact,methJann1,paraDeni_PD1222,borrBurg,pyroIsla1,orieTsut_BORYONG,shewMR4,methKand1,methCaps_BATH,onioYell_PHYTOPLASMA,bordBron,cenaSymb1,burkCeno_HI2424,franTula_TULARENSIS,pyrFur2,mariAqua_VT8,heliPylo_J99,psycArct_273_4,vibrChol_MO10_1,vibrPara1,rickBell_RML369_C,metAce1,buchSp,ehrlRumi_WELGEVONDEN,methLabrZ_1,chlaPneu_CWL029,thioCrun_XCL_2,pyroCali1,chloTepi_TLS,stapAure_MU50,novoArom_DSM12444,magnMC1,zymoMobi_ZM4,salmTyph_TY2,chloChlo_CAD3,azoaSp_EBN1,therTher_HB27,bifiLong,picrTorr1,listInno,bdelBact,gramFors_KT0803,sulfAcid1,geobTher_NG80_2,peloCarb,ralsEutr_JMP134,mannSucc_MBEL55E,syneSp_WH8102,methTherPT1,clavMich_NCPPB_382,therAcid1,syntAcid_SB,porpGing_W83,therNeut0,leifXyli_XYLI_CTCB0,shewFrig,photProf_SS9,thioDeni_ATCC25259,methMaze1,desuRedu_MI_1,burkThai_E264,campFetu_82_40,blocFlor,jannCCS1,nitrMult_ATCC25196,streCoel,soliUsit_ELLIN6076,pastMult,saliRube_DSM13855,methTher1,nostSp,shigFlex_2A,saccDegr_2_40,oceaIhey,dehaEthe_195,rhodRubr_ATCC11170,arthFB24,shewMR7,pireSp,anaeDeha_2CP_C,haloVolc1,dichNodo_VCS1703A,tricEryt_IMS101,mycoGeni,thioDeni_ATCC33889,methSmit1,geobUran_RF4,shewDeni,halMar1,desuHafn_Y51,methStad1,granBeth_CGDNIH1,therPend1,legiPneu_PHILADELPHIA,vibrChol_O395_1,nitrOcea_ATCC19707,campJeju_RM1221,methPetr_PM1,heliAcin_SHEEBA,eschColi_APEC_O1,peloTher_SI,haloHalo1,syntFuma_MPOB,xyleFast,gloeViol,leucMese_ATCC8293,bactThet_VPI_5482,xantCamp,sodaGlos_MORSITANS,geobSulf,roseDeni_OCH_114,coryEffi_YS_314,brucMeli,mycoTube_H37RV,vibrFisc_ES114_1,pyrAby1,burkXeno_LB400,polyQLWP,stapMari1,peloLute_DSM273,burkCeno_AU_1054,shewBalt,nocaFarc_IFM10152,ente638,mculMari1,saliTrop_CNB_440,neorSenn_MIYAYAMA,aquiAeol,dechArom_RCB,myxoXant_DK_1622,burkPseu_1106A,burkCepa_AMMD,methMari_C5_1,azorCaul2,methFlag_KT,leptInte,eschColi_K12,synePCC6,baumCica_HOMALODISCA,methBark1,pseuAeru,geobMeta_GS15,eschColi_CFT073,photLumi,metMar1,hermArse,campJeju,therKoda1,aeroHydr_ATCC7966,baciAnth_AMES,shewOnei,therTeng,lawsIntr_PHE_MN1_00 #Harvested from http://genome-test.cse.ucsc.edu/cgi-bin/das/dsn --- a/tool_conf.xml.sample Tue Jul 05 12:40:43 2011 +1000 +++ b/tool_conf.xml.sample Wed Jul 06 09:44:56 2011 +1000 @@ -368,7 +368,6 @@ </section><section name="NGS: Simulation" id="ngs-simulation"><tool file="ngs_simulation/ngs_simulation.xml" /> - <tool file="rgenetics/EpiD.xml" /></section><section name="SNP/WGA: Data; Filters" id="rgdat"><label text="Data: Import and upload" id="rgimport" /> --- a/tools/data_source/ucsc_tablebrowser.xml Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/data_source/ucsc_tablebrowser.xml Wed Jul 06 09:44:56 2011 +1000 @@ -5,27 +5,27 @@ initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --><tool name="UCSC Main" id="ucsc_table_direct1" tool_type="data_source"> - <description>table browser</description> - <command interpreter="python">data_source.py $output $__app__.config.output_size_limit</command> - <inputs action="http://ucsc.omics.bhri.internal/cgi-bin/hgTables" check_values="false" method="get"> - <display>go to UCSC Table Browser $GALAXY_URL</display> - <param name="GALAXY_URL" type="baseurl" value="/tool_runner" /> - <param name="tool_id" type="hidden" value="ucsc_table_direct1" /> - <param name="sendToGalaxy" type="hidden" value="1" /> - <param name="hgta_compressType" type="hidden" value="none" /> - <param name="hgta_outputType" type="hidden" value="bed" /> - </inputs> - <request_param_translation> + <description>table browser</description> + <command interpreter="python">data_source.py $output $__app__.config.output_size_limit</command> + <inputs action="http://genome.ucsc.edu/cgi-bin/hgTables" check_values="false" method="get"> + <display>go to UCSC Table Browser $GALAXY_URL</display> + <param name="GALAXY_URL" type="baseurl" value="/tool_runner" /> + <param name="tool_id" type="hidden" value="ucsc_table_direct1" /> + <param name="sendToGalaxy" type="hidden" value="1" /> + <param name="hgta_compressType" type="hidden" value="none" /> + <param name="hgta_outputType" type="hidden" value="bed" /> + </inputs> + <request_param_translation><request_param galaxy_name="URL_method" remote_name="URL_method" missing="post" /><request_param galaxy_name="URL" remote_name="URL" missing="" /><request_param galaxy_name="dbkey" remote_name="db" missing="?" /><request_param galaxy_name="organism" remote_name="org" missing="unknown species" /> - <request_param galaxy_name="table" remote_name="hgta_table" missing="unknown table" /> - <request_param galaxy_name="description" remote_name="hgta_regionType" missing="no description" /> - <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="tabular" > + <request_param galaxy_name="table" remote_name="hgta_table" missing="unknown table" /> + <request_param galaxy_name="description" remote_name="hgta_regionType" missing="no description" /> + <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="auto" ><value_translation> - <value galaxy_value="tabular" remote_value="primaryTable" /> - <value galaxy_value="tabular" remote_value="selectedFields" /> + <value galaxy_value="auto" remote_value="primaryTable" /> + <value galaxy_value="auto" remote_value="selectedFields" /><value galaxy_value="wig" remote_value="wigData" /><value galaxy_value="interval" remote_value="tab" /><value galaxy_value="html" remote_value="hyperlinks" /> @@ -33,10 +33,10 @@ <value galaxy_value="gtf" remote_value="gff" /></value_translation></request_param> - </request_param_translation> - <uihints minwidth="800"/> - <outputs> - <data name="output" format="tabular" /> - </outputs> - <options sanitize="False" refresh="True"/> + </request_param_translation> + <uihints minwidth="800"/> + <outputs> + <data name="output" format="tabular" label="${tool.name} on ${organism}: ${table} (#if $description == 'range' then $getVar( 'position', 'unknown position' ) else $description#)"/> + </outputs> + <options sanitize="False" refresh="True"/></tool> --- a/tools/meme/meme.xml Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/meme/meme.xml Wed Jul 06 09:44:56 2011 +1000 @@ -304,7 +304,7 @@ </when></conditional> - <param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="True"> + <param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False"><validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator></param> --- a/tools/peak_calling/macs_wrapper.py Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/peak_calling/macs_wrapper.py Wed Jul 06 09:44:56 2011 +1000 @@ -51,8 +51,7 @@ cmdline = "macs -t %s" % ",".join( options['input_chipseq'] ) if options['input_control']: cmdline = "%s -c %s" % ( cmdline, ",".join( options['input_control'] ) ) - cmdline = "%s --format='%s' --name='%s' --gsize='%s' --tsize='%s' --bw='%s' --pvalue='%s' --mfold='%s' %s %s" %\ - ( cmdline, options['format'], experiment_name, options['gsize'], options['tsize'], options['bw'], options['pvalue'], options['mfold'], options['nolambda'], options['futurefdr'] ) + cmdline = "%s --format='%s' --name='%s' --gsize='%s' --tsize='%s' --bw='%s' --pvalue='%s' --mfold='%s' %s --lambdaset='%s' %s" % ( cmdline, options['format'], experiment_name, options['gsize'], options['tsize'], options['bw'], options['pvalue'], options['mfold'], options['nolambda'], options['lambdaset'], options['futurefdr'] ) if 'wig' in options: wigextend = int( options['wig']['wigextend'] ) if wigextend >= 0: --- a/tools/peak_calling/macs_wrapper.xml Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/peak_calling/macs_wrapper.xml Wed Jul 06 09:44:56 2011 +1000 @@ -28,8 +28,7 @@ <param name="tsize" type="integer" label="Tag size" value="25"/><param name="bw" type="integer" label="Band width" value="300"/><param name="pvalue" type="float" label="Pvalue cutoff for peak detection" value="1e-5" help="default: 1e-5"/> - <param name="mfold" type="text" label="Select the regions with MFOLD high-confidence enrichment ratio against background to build model" value="10,30" - help="Range for high-confidence enrichment ratio against background for model are within this range. DEFAULT:10,30" /> + <param name="mfold" type="integer" label="Select the regions with MFOLD high-confidence enrichment ratio against background to build model" value="32"/><param name="xls_to_interval" label="Parse xls files into into distinct interval files" type="boolean" truevalue="create" falsevalue="do_not_create" checked="False"/><conditional name="wig_type"><param name="wig_type_selector" type="select" label="Save shifted raw tag count at every bp into a wiggle file"> @@ -45,6 +44,7 @@ </when></conditional><param name="nolambda" label="Use fixed background lambda as local lambda for every peak region" type="boolean" truevalue="--nolambda" falsevalue="" checked="False" help="up to 9X more time consuming"/> + <param name="lambdaset" type="text" label="3 levels of regions around the peak region to calculate the maximum lambda as local lambda" value="1000,5000,10000" size="50"/><conditional name="nomodel_type"><param name="nomodel_type_selector" type="select" label="Build Model"><option value="nomodel">Do not build the shifting model</option> @@ -95,7 +95,7 @@ <configfile name="options_file"><% import simplejson %> -#set $__options = { 'experiment_name':str( $experiment_name ), 'gsize':int( float( str( $gsize ) ) ), 'tsize':str( $tsize ), 'bw':str( $bw ), 'pvalue':str( $pvalue ), 'mfold':str( $mfold ), 'nolambda':str( $nolambda ), 'futurefdr':str( $futurefdr ) } +#set $__options = { 'experiment_name':str( $experiment_name ), 'gsize':int( float( str( $gsize ) ) ), 'tsize':str( $tsize ), 'bw':str( $bw ), 'pvalue':str( $pvalue ), 'mfold':str( $mfold ), 'nolambda':str( $nolambda ), 'lambdaset': str( $lambdaset ), 'futurefdr':str( $futurefdr ) } #if str( $xls_to_interval ) == 'create': #set $__options['xls_to_interval'] = { 'peaks_file': str( $output_xls_to_interval_peaks_file ), 'negative_peaks_file': str( $output_xls_to_interval_negative_peaks_file ) } #else: @@ -145,13 +145,14 @@ <param name="input_control_file1" value="chipseq_input.bed.gz" ftype="bed" /><param name="experiment_name" value="Galaxy Test Run" /><param name="tsize" value="36" /> - <param name="mfold" value="10,30" /> + <param name="mfold" value="13" /><param name="gsize" value="2.7e+9" /><param name="bw" value="300" /><param name="pvalue" value="1e-5" /><param name="xls_to_interval" /><param name="wig_type_selector" value="no_wig" /><param name="nolambda"/> + <param name="lambdaset" value="1000,5000,10000"/><param name="nomodel_type_selector" value="create_model" /><param name="diag_type_selector" value="no_diag" /><param name="futurefdr"/> @@ -170,13 +171,14 @@ <param name="input_control_file1" value="chipseq_input.bed.gz" ftype="bed" /><param name="experiment_name" value="Galaxy Test Run" /><param name="tsize" value="36" /> - <param name="mfold" value="10,30" /> + <param name="mfold" value="13" /><param name="gsize" value="2.7e+9" /><param name="bw" value="300" /><param name="pvalue" value="1e-5" /><param name="xls_to_interval" value="true" /><param name="wig_type_selector" value="no_wig" /><param name="nolambda"/> + <param name="lambdaset" value="1000,5000,10000"/><param name="nomodel_type_selector" value="create_model" /><param name="diag_type_selector" value="no_diag" /><param name="futurefdr"/> @@ -193,7 +195,7 @@ <param name="input_control_file1" value="chipseq_input.bed.gz" ftype="bed" /><param name="experiment_name" value="Galaxy Test Run" /><param name="tsize" value="36" /> - <param name="mfold" value="10,30" /> + <param name="mfold" value="13" /><param name="gsize" value="2.7e+9" /><param name="bw" value="300" /><param name="pvalue" value="1e-5" /> @@ -202,6 +204,7 @@ <param name="wigextend" value="-1" /><param name="space" value="10" /><param name="nolambda"/> + <param name="lambdaset" value="1000,5000,10000"/><param name="nomodel_type_selector" value="create_model" /><param name="diag_type_selector" value="no_diag" /><param name="futurefdr"/> --- a/tools/plotting/histogram.py Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/plotting/histogram.py Wed Jul 06 09:44:56 2011 +1000 @@ -73,8 +73,7 @@ if skipped_lines < i: try: - #a = array( matrix ) - a=matrix + a = r.array( matrix ) r.pdf( out_fname, 8, 8 ) histogram = r.hist( a, probability=not frequency, main=title, xlab=xlab, breaks=breaks ) if density: --- a/tools/plotting/scatterplot.py Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/plotting/scatterplot.py Wed Jul 06 09:44:56 2011 +1000 @@ -19,14 +19,8 @@ title = sys.argv[5] xlab = sys.argv[6] ylab = sys.argv[7] - out_type = sys.argv[8] - out_width = int(sys.argv[9]) - out_height = int(sys.argv[10]) - point_size = float(sys.argv[11]) - - xvec=[] - yvec=[] + matrix = [] skipped_lines = 0 first_invalid_line = 0 invalid_value = '' @@ -34,19 +28,17 @@ i = 0 for i, line in enumerate( file( in_fname ) ): valid = True - vals = [] line = line.rstrip( '\r\n' ) if line and not line.startswith( '#' ): row = [] fields = line.split( "\t" ) - for c,column in enumerate(columns): + for column in columns: try: val = fields[column] if val.lower() == "na": - v = float( "nan" ) + row.append( float( "nan" ) ) else: - v = float( fields[column] ) - vals.append(val) + row.append( float( fields[column] ) ) except: valid = False skipped_lines += 1 @@ -65,19 +57,12 @@ first_invalid_line = i+1 if valid: - xvec.append(vals[0]) - yvec.append(vals[1]) + matrix.append( row ) + if skipped_lines < i: try: - if out_type == "jpg": - r.jpeg(out_fname,width=out_width,height=out_height) - elif out_type == "png": - # type="cairo" needed to be set for headless servers - r.png(out_fname,type="cairo",width=out_width,height=out_height) - else: - r.pdf(out_fname, out_width, out_height) - - r.plot(xvec,yvec, type="p", main=title, xlab=xlab, ylab=ylab, col="blue", pch=19,cex=point_size ) + r.pdf( out_fname, 8, 8 ) + r.plot( array( matrix ), type="p", main=title, xlab=xlab, ylab=ylab, col="blue", pch=19 ) r.dev_off() except Exception, exc: stop_err( "%s" %str( exc ) ) --- a/tools/plotting/scatterplot.xml Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/plotting/scatterplot.xml Wed Jul 06 09:44:56 2011 +1000 @@ -1,6 +1,6 @@ <tool id="scatterplot_rpy" name="Scatterplot"><description>of two numeric columns</description> - <command interpreter="python">scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab" $output_format $out_width $out_height $point_size</command> + <command interpreter="python">scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab"</command><inputs><param name="input" type="data" format="tabular" label="Dataset" help="Dataset missing? See TIP below"/><param name="col1" type="data_column" data_ref="input" numerical="True" label="Numerical column for x axis" /> @@ -8,26 +8,15 @@ <param name="title" size="30" type="text" value="Scatterplot" label="Plot title"/><param name="xlab" size="30" type="text" value="V1" label="Label for x axis"/><param name="ylab" size="30" type="text" value="V2" label="Label for y axis"/> - <param name="output_format" type="select" label="Output format"> - <option value="pdf">pdf</option> - <option value="png">png</option> - <option value="jpg">jpg</option> - </param> - <param name="out_width" size="4" type="integer" value="8" label="Width (pdf=inches, image=pixels)"/> - <param name="out_height" size="4" type="integer" value="8" label="Height (pdf=inches, image=pixels)"/> - <param name="point_size" size="4" type="float" value="0.2" label="Point Size"/></inputs><outputs> - <data format="pdf" name="out_file1"> - <change_format> - <when input="output_format" value="png" format="png" /> - <when input="output_format" value="jpg" format="jpg" /> - </change_format> - </data> + <data format="pdf" name="out_file1" /></outputs><requirements><requirement type="python-module">rpy</requirement></requirements> + <!-- TODO: uncomment the following test when we have tools.update_state() working for + multiple dependents with the same dependency. <tests><test><param name="input" value="scatterplot_in1.tabular" ftype="tabular"/> @@ -36,38 +25,8 @@ <param name="title" value="Scatterplot"/><param name="xlab" value="V1"/><param name="ylab" value="V2"/> - <param name="out_width" value="8"/> - <param name="out_height" value="8"/> - <param name="point_size" value="0.5"/> - <param name="output_format" value="pdf" /><output name="out_file1" file="scatterplot_out1.pdf" /></test> - <test> - <param name="input" value="scatterplot_in1.tabular" ftype="tabular"/> - <param name="col1" value="2"/> - <param name="col2" value="3"/> - <param name="title" value="Scatterplot"/> - <param name="xlab" value="V1"/> - <param name="ylab" value="V2"/> - <param name="out_width" value="800"/> - <param name="out_height" value="600"/> - <param name="point_size" value="0.5"/> - <param name="output_format" value="png" /> - <output name="out_file1" file="scatterplot_out1.png" /> - </test> - <test> - <param name="input" value="scatterplot_in1.tabular" ftype="tabular"/> - <param name="col1" value="2"/> - <param name="col2" value="3"/> - <param name="title" value="Scatterplot"/> - <param name="xlab" value="V1"/> - <param name="ylab" value="V2"/> - <param name="out_width" value="800"/> - <param name="out_height" value="600"/> - <param name="point_size" value="0.5"/> - <param name="output_format" value="jpg" /> - <output name="out_file1" file="scatterplot_out1.jpg" /> - </test></tests> --><help> --- a/tools/samtools/bam_to_sam.py Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/samtools/bam_to_sam.py Wed Jul 06 09:44:56 2011 +1000 @@ -21,6 +21,7 @@ parser = optparse.OptionParser() parser.add_option( '', '--input1', dest='input1', help='The input SAM dataset' ) parser.add_option( '', '--output1', dest='output1', help='The output BAM dataset' ) + parser.add_option( '', '--header', dest='header', action='store_true', default=False, help='Write SAM Header' ) ( options, args ) = parser.parse_args() # output version # of tool @@ -87,7 +88,11 @@ try: # Extract all alignments from the input BAM file to SAM format ( since no region is specified, all the alignments will be extracted ). - command = 'samtools view -o -h %s %s' % ( options.output1, tmp_sorted_aligns_file_name ) + if options.header: + view_options = "-h" + else: + view_options = "" + command = 'samtools view %s -o %s %s' % ( view_options, options.output1, tmp_sorted_aligns_file_name ) tmp = tempfile.NamedTemporaryFile( dir=tmp_dir ).name tmp_stderr = open( tmp, 'wb' ) proc = subprocess.Popen( args=command, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno() ) --- a/tools/samtools/sam_bitwise_flag_filter.py Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/samtools/sam_bitwise_flag_filter.py Wed Jul 06 09:44:56 2011 +1000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Refactored on 11/13/2010 by Kanwei Li -# Added drop_header option - default is now keep headers for downstream sanity by ross lazarus + import sys import optparse @@ -14,11 +14,7 @@ options (listed below) default to 'None' if omitted """ parser = optparse.OptionParser(usage=usage) - parser.add_option('--drop_header', - action = 'store_true', - dest='drop_header', - help="Remove sam header - you probably NEVER want this for fussy downstream tools") - + parser.add_option( '--0x0001','--is_paired', choices = ( '0','1' ), @@ -133,24 +129,21 @@ opt_map = { '0': False, '1': True } used_indices = [(index, opt_map[opt]) for index, opt in enumerate(opt_ary) if opt is not None] flag_col = int( options.flag_col ) - 1 + for line in infile: line = line.rstrip( '\r\n' ) - if line: - if line.startswith('@'): - if not options.drop_header: - print line # usually want these so add -h if you don't want headers - elif not line.startswith( '#' ) : - fields = line.split( '\t' ) - flags = int( fields[flag_col] ) + if line and not line.startswith( '#' ) and not line.startswith( '@' ) : + fields = line.split( '\t' ) + flags = int( fields[flag_col] ) - valid_line = True - for index, opt_bool in used_indices: - if bool(flags & 0x0001 << index) != opt_bool: - valid_line = False - break + valid_line = True + for index, opt_bool in used_indices: + if bool(flags & 0x0001 << index) != opt_bool: + valid_line = False + break - if valid_line: - print line + if valid_line: + print line if __name__ == "__main__": main() --- a/tools/samtools/sam_bitwise_flag_filter.xml Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/samtools/sam_bitwise_flag_filter.xml Wed Jul 06 09:44:56 2011 +1000 @@ -1,11 +1,8 @@ -<tool id="sam_bw_filter" name="Filter SAM" version="1.0.1"> +<tool id="sam_bw_filter" name="Filter SAM" version="1.0.0"><description>on bitwise flag values</description><parallelism method="basic"></parallelism><command interpreter="python"> sam_bitwise_flag_filter.py - #if $drop_header == "1": - --drop_header - #end if --input_sam_file=$input1 --flag_column=2 #for $bit in $bits @@ -15,11 +12,6 @@ </command><inputs><param format="sam" name="input1" type="data" label="Select dataset to filter"/> - <param name="drop_header" type="select" display="radio" label="DROP sam headers" - help="Set this if you REALLY want to throw away existing sam header metadata - downstream (eg Picard) tools often demand it" > - <option value="0" selected="true">Keep headers (default)</option> - <option value="1">Drop headers</option> - </param><repeat name="bits" title="Flag"><param name="flags" type="select" label="Type"><option value="--0x0001">Read is paired</option> --- a/tools/samtools/sam_to_bam.py Tue Jul 05 12:40:43 2011 +1000 +++ b/tools/samtools/sam_to_bam.py Wed Jul 06 09:44:56 2011 +1000 @@ -68,7 +68,7 @@ # and the equCab2.fa file will contain fasta sequences. seq_path = check_seq_file( options.dbkey, cached_seqs_pointer_file ) tmp_dir = tempfile.mkdtemp() - if options.ref_file == 'None': + if not options.ref_file or options.ref_file == 'None': # We're using locally cached reference sequences( e.g., /galaxy/data/equCab2/sam_index/equCab2.fa ). # The indexes for /galaxy/data/equCab2/sam_index/equCab2.fa will be contained in # a file named /galaxy/data/equCab2/sam_index/equCab2.fa.fai @@ -125,9 +125,7 @@ tmp_aligns_file = tempfile.NamedTemporaryFile( dir=tmp_dir ) tmp_aligns_file_name = tmp_aligns_file.name tmp_aligns_file.close() - # IMPORTANT NOTE: for some reason the samtools view command gzips the resulting bam file without warning, - # and the docs do not currently state that this occurs ( very bad ). - command = 'samtools view -h -bt %s -o %s %s' % ( fai_index_file_path, tmp_aligns_file_name, options.input1 ) + command = 'samtools view -bt %s -o %s %s' % ( fai_index_file_path, tmp_aligns_file_name, options.input1 ) tmp = tempfile.NamedTemporaryFile( dir=tmp_dir ).name tmp_stderr = open( tmp, 'wb' ) proc = subprocess.Popen( args=command, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno() ) @@ -147,8 +145,6 @@ tmp_stderr.close() if returncode != 0: raise Exception, stderr - if len( open( tmp_aligns_file_name ).read() ) == 0: - raise Exception, 'Initial BAM file empty' except Exception, e: #clean up temp files if os.path.exists( tmp_dir ): @@ -188,11 +184,6 @@ stop_err( 'Error sorting alignments from (%s), %s' % ( tmp_aligns_file_name, str( e ) ) ) # Move tmp_aligns_file_name to our output dataset location sorted_bam_file = '%s.bam' % tmp_sorted_aligns_file_name - if os.path.getsize( sorted_bam_file ) == 0: - #clean up temp files - if os.path.exists( tmp_dir ): - shutil.rmtree( tmp_dir ) - stop_err( 'Error creating sorted version of BAM file' ) shutil.move( sorted_bam_file, options.output1 ) #clean up temp files if os.path.exists( tmp_dir ): @@ -201,6 +192,6 @@ if os.path.getsize( options.output1 ) > 0: sys.stdout.write( 'SAM file converted to BAM' ) else: - stop_err( 'The output file is empty, there may be an error with your input file or settings.' ) + stop_err( 'Error creating sorted version of BAM file.' ) if __name__=="__main__": __main__() http://bitbucket.org/galaxy/galaxy-central/changeset/f37951db86e6/ changeset: f37951db86e6 user: fubar date: 2011-07-06 01:45:41 summary: committing backout from 5765 which included reversions from a broken galaxy-central repository affected #: 251 files (5.7 KB) --- a/lib/galaxy/security/__init__.py Tue Jul 05 11:42:56 2011 -0400 +++ b/lib/galaxy/security/__init__.py Wed Jul 06 09:45:41 2011 +1000 @@ -1005,8 +1005,7 @@ ucsc_main = ( 'hgw1.cse.ucsc.edu', 'hgw2.cse.ucsc.edu', 'hgw3.cse.ucsc.edu', 'hgw4.cse.ucsc.edu', 'hgw5.cse.ucsc.edu', 'hgw6.cse.ucsc.edu', 'hgw7.cse.ucsc.edu', 'hgw8.cse.ucsc.edu' ), ucsc_test = ( 'hgwdev.cse.ucsc.edu', ), - ucsc_archaea = ( 'lowepub.cse.ucsc.edu', ), - ucsc_bhri = ('ucsc.omics.bhri.internal','galaxy.omics.bhri.internal'), + ucsc_archaea = ( 'lowepub.cse.ucsc.edu', ) ) def __init__( self, model, permitted_actions=None ): self.model = model @@ -1037,7 +1036,7 @@ # We're going to search in order, but if the remote site is load # balancing their connections (as UCSC does), this is okay. try: - if socket.gethostbyname( server ) == addr or server == '127.0.0.1' or server == '172.16.0.38': + if socket.gethostbyname( server ) == addr: break # remote host is in the server list except ( socket.error, socket.gaierror ): pass # can't resolve, try next --- a/lib/galaxy/tools/__init__.py Tue Jul 05 11:42:56 2011 -0400 +++ b/lib/galaxy/tools/__init__.py Wed Jul 06 09:45:41 2011 +1000 @@ -922,8 +922,6 @@ if not self.check_values: return for input in self.inputs.itervalues(): - if input.name not in value: - value[input.name] = input.get_initial_value( None, value ) if isinstance( input, ToolParameter ): callback( "", input, value[input.name] ) else: --- a/lib/galaxy/tools/parameters/basic.py Tue Jul 05 11:42:56 2011 -0400 +++ b/lib/galaxy/tools/parameters/basic.py Wed Jul 06 09:45:41 2011 +1000 @@ -748,6 +748,9 @@ # Dependency on a value that does not yet exist if isinstance( dep_value, RuntimeValue ): return True + #dataset not ready yet + if hasattr( self, 'ref_input' ) and isinstance( dep_value, self.tool.app.model.HistoryDatasetAssociation ) and ( dep_value.is_pending or not isinstance( dep_value.datatype, self.ref_input.formats ) ): + return True # Dynamic, but all dependenceis are known and have values return False def get_initial_value( self, trans, context ): @@ -878,6 +881,7 @@ self.force_select = string_as_bool( elem.get( "force_select", True )) self.accept_default = string_as_bool( elem.get( "accept_default", False )) self.data_ref = elem.get( "data_ref", None ) + self.ref_input = None self.default_value = elem.get( "default_value", None ) self.is_dynamic = True def from_html( self, value, trans=None, context={} ): @@ -973,7 +977,7 @@ if not dataset.metadata.columns: # Only allow late validation if the dataset is not yet ready # (since we have reason to expect the metadata to be ready eventually) - if dataset.is_pending: + if dataset.is_pending or not isinstance( dataset.datatype, self.ref_input.formats ): return True # No late validation return False @@ -1353,7 +1357,7 @@ selected = ( value and ( hda in value ) ) field.add_option( "%s: %s" % ( hid, hda_name ), hda.id, selected ) else: - target_ext, converted_dataset = hda.find_conversion_destination( self.formats, converter_safe = self.converter_safe( other_values, trans ) ) + target_ext, converted_dataset = hda.find_conversion_destination( self.formats ) if target_ext: if converted_dataset: hda = converted_dataset @@ -1402,13 +1406,22 @@ pass #no valid options def dataset_collector( datasets ): def is_convertable( dataset ): - target_ext, converted_dataset = dataset.find_conversion_destination( self.formats, converter_safe = self.converter_safe( context, trans ) ) + target_ext, converted_dataset = dataset.find_conversion_destination( self.formats ) if target_ext is not None: return True return False for i, data in enumerate( datasets ): - if data.visible and not data.deleted and data.state not in [data.states.ERROR, data.states.DISCARDED] and ( isinstance( data.datatype, self.formats) or is_convertable( data ) ): - if self.options and self._options_filter_attribute( data ) != filter_value: + if data.visible and not data.deleted and data.state not in [data.states.ERROR, data.states.DISCARDED]: + is_valid = False + if isinstance( data.datatype, self.formats ): + is_valid = True + else: + target_ext, converted_dataset = data.find_conversion_destination( self.formats ) + if target_ext: + is_valid = True + if converted_dataset: + data = converted_dataset + if not is_valid or ( self.options and self._options_filter_attribute( data ) != filter_value ): continue most_recent_dataset[0] = data # Also collect children via association object --- a/lib/galaxy/web/framework/middleware/remoteuser.py Tue Jul 05 11:42:56 2011 -0400 +++ b/lib/galaxy/web/framework/middleware/remoteuser.py Wed Jul 06 09:45:41 2011 +1000 @@ -36,7 +36,6 @@ """ UCSC_MAIN_SERVERS = ( - 'omics.bhri.internal', 'hgw1.cse.ucsc.edu', 'hgw2.cse.ucsc.edu', 'hgw3.cse.ucsc.edu', @@ -50,7 +49,6 @@ 'lowepub.cse.ucsc.edu', ) - class RemoteUser( object ): def __init__( self, app, maildomain=None, ucsc_display_sites=[], admin_users=[] ): self.app = app @@ -58,7 +56,7 @@ self.allow_ucsc_main = False self.allow_ucsc_archaea = False self.admin_users = admin_users - if 'main' in ucsc_display_sites or 'test' in ucsc_display_sites or 'bhri' in ucsc_display_sites: + if 'main' in ucsc_display_sites or 'test' in ucsc_display_sites: self.allow_ucsc_main = True if 'archaea' in ucsc_display_sites: self.allow_ucsc_archaea = True --- a/scripts/cleanup_datasets/purge_libraries.sh Tue Jul 05 11:42:56 2011 -0400 +++ b/scripts/cleanup_datasets/purge_libraries.sh Wed Jul 06 09:45:41 2011 +1000 @@ -1,5 +1,4 @@ #!/bin/sh cd `dirname $0`/../.. -#python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log -python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 2 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log +python ./scripts/cleanup_datasets/cleanup_datasets.py ./universe_wsgi.ini -d 10 -4 -r $@ >> ./scripts/cleanup_datasets/purge_libraries.log --- a/tool-data/shared/ucsc/ucsc_build_sites.txt Tue Jul 05 11:42:56 2011 -0400 +++ b/tool-data/shared/ucsc/ucsc_build_sites.txt Wed Jul 06 09:45:41 2011 +1000 @@ -1,6 +1,5 @@ #Harvested from http://genome.ucsc.edu/cgi-bin/das/dsn main http://genome.ucsc.edu/cgi-bin/hgTracks? priPac1,danRer4,mm9,mm8,droAna1,mm5,caeRem2,mm7,mm6,panTro1,dm3,panTro2,anoCar1,ce4,galGal3,galGal2,ce1,rn3,rn2,droMoj1,droMoj2,rn4,droYak1,droYak2,dp3,dp2,dm1,canFam1,danRer5,canFam2,danRer3,danRer2,ornAna1,ci2,ci1,tetNig1,bosTau1,bosTau3,bosTau2,equCab1,oryLat1,droAna2,droEre1,ponAbe2,rheMac2,sacCer1,droPer1,droSim1,monDom1,cb1,dm2,droSec1,strPur1,droVir2,droVir1,strPur2,sc1,xenTro1,droGri1,xenTro2,cb3,gasAcu1,caePb1,anoGam1,fr2,fr1,hg15,hg16,hg17,hg18,felCat3,apiMel2,monDom4,apiMel1,ce2 -bhri http://ucsc.omics.bhri.internal/cgi-bin/hgTracks? hg18,hg19,mm8,mm9,rn4 #Harvested from http://archaea.ucsc.edu/cgi-bin/das/dsn archaea http://archaea.ucsc.edu/cgi-bin/hgTracks? alkaEhrl_MLHE_1,shewW318,idioLoih_L2TR,sulSol1,erwiCaro_ATROSEPTICA,symbTher_IAM14863,moorTher_ATCC39073,therFusc_YX,methHung1,bradJapo,therElon,shewPutrCN32,pediPent_ATCC25745,mariMari_MCS10,nanEqu1,baciSubt,chlaTrac,magnMagn_AMB_1,chroViol,ralsSola,acidCryp_JF_5,erytLito_HTCC2594,desuVulg_HILDENBOROUG,pyrAer1,sulfToko1,shewANA3,paraSp_UWE25,geobKaus_HTA426,rhizEtli_CFN_42,uncuMeth_RCI,candBloc_FLORIDANUS,deinRadi,yersPest_CO92,saccEryt_NRRL_2338,rhodRHA1,candCars_RUDDII,burkMall_ATCC23344,eschColi_O157H7,burk383,psycIngr_37,rhodSpha_2_4_1,wolbEndo_OF_DROSOPHIL,burkViet_G4,propAcne_KPA171202,enteFaec_V583,campJeju_81_176,acidJS42,heliPylo_26695,pseuHalo_TAC125,chroSale_DSM3043,methVann1,archFulg1,neisMeni_Z2491_1,fusoNucl,vermEise_EF01_2,anabVari_ATCC29413,tropWhip_TW08_27,heliHepa,acinSp_ADP1,anapMarg_ST_MARIES,natrPhar1,haheChej_KCTC_2396,therPetr_RKU_1,neisGono_FA1090_1,colwPsyc_34H,desuPsyc_LSV54,hyphNept_ATCC15444,vibrChol1,deinGeot_DSM11300,strePyog_M1_GAS,franCcI3,salmTyph,metaSedu,lactSali_UCC118,trepPall,neisMeni_MC58_1,syntWolf_GOETTINGEN,flavJohn_UW101,methBoon1,haemSomn_129PT,shewLoihPV4,igniHosp1,haemInfl_KW20,haloHalo_SL1,ferrAcid1,sphiAlas_RB2256,candPela_UBIQUE_HTCC1,caldSacc_DSM8903,aerPer1,lactPlan,carbHydr_Z_2901,therTher_HB8,vibrVuln_YJ016_1,rhodPalu_CGA009,acidCell_11B,siliPome_DSS_3,therVolc1,haloWals1,rubrXyla_DSM9941,shewAmaz,nocaJS61,vibrVuln_CMCP6_1,sinoMeli,ureaUrea,baciHalo,bartHens_HOUSTON_1,nitrWino_NB_255,hypeButy1,methBurt2,polaJS66,mesoLoti,methMari_C7,caulCres,neisMeni_FAM18_1,acidBact_ELLIN345,caldMaqu1,salmEnte_PARATYPI_ATC,glucOxyd_621H,cytoHutc_ATCC33406,nitrEuro,therMari,coxiBurn,woliSucc,heliPylo_HPAG1,mesoFlor_L1,pyrHor1,methAeol1,procMari_CCMP1375,pyroArse1,oenoOeni_PSU_1,alcaBork_SK2,wiggBrev,actiPleu_L20,lactLact,methJann1,paraDeni_PD1222,borrBurg,pyroIsla1,orieTsut_BORYONG,shewMR4,methKand1,methCaps_BATH,onioYell_PHYTOPLASMA,bordBron,cenaSymb1,burkCeno_HI2424,franTula_TULARENSIS,pyrFur2,mariAqua_VT8,heliPylo_J99,psycArct_273_4,vibrChol_MO10_1,vibrPara1,rickBell_RML369_C,metAce1,buchSp,ehrlRumi_WELGEVONDEN,methLabrZ_1,chlaPneu_CWL029,thioCrun_XCL_2,pyroCali1,chloTepi_TLS,stapAure_MU50,novoArom_DSM12444,magnMC1,zymoMobi_ZM4,salmTyph_TY2,chloChlo_CAD3,azoaSp_EBN1,therTher_HB27,bifiLong,picrTorr1,listInno,bdelBact,gramFors_KT0803,sulfAcid1,geobTher_NG80_2,peloCarb,ralsEutr_JMP134,mannSucc_MBEL55E,syneSp_WH8102,methTherPT1,clavMich_NCPPB_382,therAcid1,syntAcid_SB,porpGing_W83,therNeut0,leifXyli_XYLI_CTCB0,shewFrig,photProf_SS9,thioDeni_ATCC25259,methMaze1,desuRedu_MI_1,burkThai_E264,campFetu_82_40,blocFlor,jannCCS1,nitrMult_ATCC25196,streCoel,soliUsit_ELLIN6076,pastMult,saliRube_DSM13855,methTher1,nostSp,shigFlex_2A,saccDegr_2_40,oceaIhey,dehaEthe_195,rhodRubr_ATCC11170,arthFB24,shewMR7,pireSp,anaeDeha_2CP_C,haloVolc1,dichNodo_VCS1703A,tricEryt_IMS101,mycoGeni,thioDeni_ATCC33889,methSmit1,geobUran_RF4,shewDeni,halMar1,desuHafn_Y51,methStad1,granBeth_CGDNIH1,therPend1,legiPneu_PHILADELPHIA,vibrChol_O395_1,nitrOcea_ATCC19707,campJeju_RM1221,methPetr_PM1,heliAcin_SHEEBA,eschColi_APEC_O1,peloTher_SI,haloHalo1,syntFuma_MPOB,xyleFast,gloeViol,leucMese_ATCC8293,bactThet_VPI_5482,xantCamp,sodaGlos_MORSITANS,geobSulf,roseDeni_OCH_114,coryEffi_YS_314,brucMeli,mycoTube_H37RV,vibrFisc_ES114_1,pyrAby1,burkXeno_LB400,polyQLWP,stapMari1,peloLute_DSM273,burkCeno_AU_1054,shewBalt,nocaFarc_IFM10152,ente638,mculMari1,saliTrop_CNB_440,neorSenn_MIYAYAMA,aquiAeol,dechArom_RCB,myxoXant_DK_1622,burkPseu_1106A,burkCepa_AMMD,methMari_C5_1,azorCaul2,methFlag_KT,leptInte,eschColi_K12,synePCC6,baumCica_HOMALODISCA,methBark1,pseuAeru,geobMeta_GS15,eschColi_CFT073,photLumi,metMar1,hermArse,campJeju,therKoda1,aeroHydr_ATCC7966,baciAnth_AMES,shewOnei,therTeng,lawsIntr_PHE_MN1_00 #Harvested from http://genome-test.cse.ucsc.edu/cgi-bin/das/dsn --- a/tool_conf.xml.sample Tue Jul 05 11:42:56 2011 -0400 +++ b/tool_conf.xml.sample Wed Jul 06 09:45:41 2011 +1000 @@ -368,7 +368,6 @@ </section><section name="NGS: Simulation" id="ngs-simulation"><tool file="ngs_simulation/ngs_simulation.xml" /> - <tool file="rgenetics/EpiD.xml" /></section><section name="SNP/WGA: Data; Filters" id="rgdat"><label text="Data: Import and upload" id="rgimport" /> --- a/tools/data_source/ucsc_tablebrowser.xml Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/data_source/ucsc_tablebrowser.xml Wed Jul 06 09:45:41 2011 +1000 @@ -5,27 +5,27 @@ initial response ( in addition to 'URL' ) will be encoded and appended to URL and a post will be performed. --><tool name="UCSC Main" id="ucsc_table_direct1" tool_type="data_source"> - <description>table browser</description> - <command interpreter="python">data_source.py $output $__app__.config.output_size_limit</command> - <inputs action="http://ucsc.omics.bhri.internal/cgi-bin/hgTables" check_values="false" method="get"> - <display>go to UCSC Table Browser $GALAXY_URL</display> - <param name="GALAXY_URL" type="baseurl" value="/tool_runner" /> - <param name="tool_id" type="hidden" value="ucsc_table_direct1" /> - <param name="sendToGalaxy" type="hidden" value="1" /> - <param name="hgta_compressType" type="hidden" value="none" /> - <param name="hgta_outputType" type="hidden" value="bed" /> - </inputs> - <request_param_translation> + <description>table browser</description> + <command interpreter="python">data_source.py $output $__app__.config.output_size_limit</command> + <inputs action="http://genome.ucsc.edu/cgi-bin/hgTables" check_values="false" method="get"> + <display>go to UCSC Table Browser $GALAXY_URL</display> + <param name="GALAXY_URL" type="baseurl" value="/tool_runner" /> + <param name="tool_id" type="hidden" value="ucsc_table_direct1" /> + <param name="sendToGalaxy" type="hidden" value="1" /> + <param name="hgta_compressType" type="hidden" value="none" /> + <param name="hgta_outputType" type="hidden" value="bed" /> + </inputs> + <request_param_translation><request_param galaxy_name="URL_method" remote_name="URL_method" missing="post" /><request_param galaxy_name="URL" remote_name="URL" missing="" /><request_param galaxy_name="dbkey" remote_name="db" missing="?" /><request_param galaxy_name="organism" remote_name="org" missing="unknown species" /> - <request_param galaxy_name="table" remote_name="hgta_table" missing="unknown table" /> - <request_param galaxy_name="description" remote_name="hgta_regionType" missing="no description" /> - <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="tabular" > + <request_param galaxy_name="table" remote_name="hgta_table" missing="unknown table" /> + <request_param galaxy_name="description" remote_name="hgta_regionType" missing="no description" /> + <request_param galaxy_name="data_type" remote_name="hgta_outputType" missing="auto" ><value_translation> - <value galaxy_value="tabular" remote_value="primaryTable" /> - <value galaxy_value="tabular" remote_value="selectedFields" /> + <value galaxy_value="auto" remote_value="primaryTable" /> + <value galaxy_value="auto" remote_value="selectedFields" /><value galaxy_value="wig" remote_value="wigData" /><value galaxy_value="interval" remote_value="tab" /><value galaxy_value="html" remote_value="hyperlinks" /> @@ -33,10 +33,10 @@ <value galaxy_value="gtf" remote_value="gff" /></value_translation></request_param> - </request_param_translation> - <uihints minwidth="800"/> - <outputs> - <data name="output" format="tabular" /> - </outputs> - <options sanitize="False" refresh="True"/> + </request_param_translation> + <uihints minwidth="800"/> + <outputs> + <data name="output" format="tabular" label="${tool.name} on ${organism}: ${table} (#if $description == 'range' then $getVar( 'position', 'unknown position' ) else $description#)"/> + </outputs> + <options sanitize="False" refresh="True"/></tool> --- a/tools/meme/meme.xml Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/meme/meme.xml Wed Jul 06 09:45:41 2011 +1000 @@ -304,7 +304,7 @@ </when></conditional> - <param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="True"> + <param name="non_commercial_use" label="I certify that I am not using this tool for commercial purposes." type="boolean" truevalue="NON_COMMERCIAL_USE" falsevalue="COMMERCIAL_USE" checked="False"><validator type="expression" message="This tool is only available for non-commercial use.">value == True</validator></param> --- a/tools/peak_calling/macs_wrapper.py Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/peak_calling/macs_wrapper.py Wed Jul 06 09:45:41 2011 +1000 @@ -51,8 +51,7 @@ cmdline = "macs -t %s" % ",".join( options['input_chipseq'] ) if options['input_control']: cmdline = "%s -c %s" % ( cmdline, ",".join( options['input_control'] ) ) - cmdline = "%s --format='%s' --name='%s' --gsize='%s' --tsize='%s' --bw='%s' --pvalue='%s' --mfold='%s' %s %s" %\ - ( cmdline, options['format'], experiment_name, options['gsize'], options['tsize'], options['bw'], options['pvalue'], options['mfold'], options['nolambda'], options['futurefdr'] ) + cmdline = "%s --format='%s' --name='%s' --gsize='%s' --tsize='%s' --bw='%s' --pvalue='%s' --mfold='%s' %s --lambdaset='%s' %s" % ( cmdline, options['format'], experiment_name, options['gsize'], options['tsize'], options['bw'], options['pvalue'], options['mfold'], options['nolambda'], options['lambdaset'], options['futurefdr'] ) if 'wig' in options: wigextend = int( options['wig']['wigextend'] ) if wigextend >= 0: --- a/tools/peak_calling/macs_wrapper.xml Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/peak_calling/macs_wrapper.xml Wed Jul 06 09:45:41 2011 +1000 @@ -28,8 +28,7 @@ <param name="tsize" type="integer" label="Tag size" value="25"/><param name="bw" type="integer" label="Band width" value="300"/><param name="pvalue" type="float" label="Pvalue cutoff for peak detection" value="1e-5" help="default: 1e-5"/> - <param name="mfold" type="text" label="Select the regions with MFOLD high-confidence enrichment ratio against background to build model" value="10,30" - help="Range for high-confidence enrichment ratio against background for model are within this range. DEFAULT:10,30" /> + <param name="mfold" type="integer" label="Select the regions with MFOLD high-confidence enrichment ratio against background to build model" value="32"/><param name="xls_to_interval" label="Parse xls files into into distinct interval files" type="boolean" truevalue="create" falsevalue="do_not_create" checked="False"/><conditional name="wig_type"><param name="wig_type_selector" type="select" label="Save shifted raw tag count at every bp into a wiggle file"> @@ -45,6 +44,7 @@ </when></conditional><param name="nolambda" label="Use fixed background lambda as local lambda for every peak region" type="boolean" truevalue="--nolambda" falsevalue="" checked="False" help="up to 9X more time consuming"/> + <param name="lambdaset" type="text" label="3 levels of regions around the peak region to calculate the maximum lambda as local lambda" value="1000,5000,10000" size="50"/><conditional name="nomodel_type"><param name="nomodel_type_selector" type="select" label="Build Model"><option value="nomodel">Do not build the shifting model</option> @@ -95,7 +95,7 @@ <configfile name="options_file"><% import simplejson %> -#set $__options = { 'experiment_name':str( $experiment_name ), 'gsize':int( float( str( $gsize ) ) ), 'tsize':str( $tsize ), 'bw':str( $bw ), 'pvalue':str( $pvalue ), 'mfold':str( $mfold ), 'nolambda':str( $nolambda ), 'futurefdr':str( $futurefdr ) } +#set $__options = { 'experiment_name':str( $experiment_name ), 'gsize':int( float( str( $gsize ) ) ), 'tsize':str( $tsize ), 'bw':str( $bw ), 'pvalue':str( $pvalue ), 'mfold':str( $mfold ), 'nolambda':str( $nolambda ), 'lambdaset': str( $lambdaset ), 'futurefdr':str( $futurefdr ) } #if str( $xls_to_interval ) == 'create': #set $__options['xls_to_interval'] = { 'peaks_file': str( $output_xls_to_interval_peaks_file ), 'negative_peaks_file': str( $output_xls_to_interval_negative_peaks_file ) } #else: @@ -145,13 +145,14 @@ <param name="input_control_file1" value="chipseq_input.bed.gz" ftype="bed" /><param name="experiment_name" value="Galaxy Test Run" /><param name="tsize" value="36" /> - <param name="mfold" value="10,30" /> + <param name="mfold" value="13" /><param name="gsize" value="2.7e+9" /><param name="bw" value="300" /><param name="pvalue" value="1e-5" /><param name="xls_to_interval" /><param name="wig_type_selector" value="no_wig" /><param name="nolambda"/> + <param name="lambdaset" value="1000,5000,10000"/><param name="nomodel_type_selector" value="create_model" /><param name="diag_type_selector" value="no_diag" /><param name="futurefdr"/> @@ -170,13 +171,14 @@ <param name="input_control_file1" value="chipseq_input.bed.gz" ftype="bed" /><param name="experiment_name" value="Galaxy Test Run" /><param name="tsize" value="36" /> - <param name="mfold" value="10,30" /> + <param name="mfold" value="13" /><param name="gsize" value="2.7e+9" /><param name="bw" value="300" /><param name="pvalue" value="1e-5" /><param name="xls_to_interval" value="true" /><param name="wig_type_selector" value="no_wig" /><param name="nolambda"/> + <param name="lambdaset" value="1000,5000,10000"/><param name="nomodel_type_selector" value="create_model" /><param name="diag_type_selector" value="no_diag" /><param name="futurefdr"/> @@ -193,7 +195,7 @@ <param name="input_control_file1" value="chipseq_input.bed.gz" ftype="bed" /><param name="experiment_name" value="Galaxy Test Run" /><param name="tsize" value="36" /> - <param name="mfold" value="10,30" /> + <param name="mfold" value="13" /><param name="gsize" value="2.7e+9" /><param name="bw" value="300" /><param name="pvalue" value="1e-5" /> @@ -202,6 +204,7 @@ <param name="wigextend" value="-1" /><param name="space" value="10" /><param name="nolambda"/> + <param name="lambdaset" value="1000,5000,10000"/><param name="nomodel_type_selector" value="create_model" /><param name="diag_type_selector" value="no_diag" /><param name="futurefdr"/> --- a/tools/plotting/histogram.py Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/plotting/histogram.py Wed Jul 06 09:45:41 2011 +1000 @@ -73,8 +73,7 @@ if skipped_lines < i: try: - #a = array( matrix ) - a=matrix + a = r.array( matrix ) r.pdf( out_fname, 8, 8 ) histogram = r.hist( a, probability=not frequency, main=title, xlab=xlab, breaks=breaks ) if density: --- a/tools/plotting/scatterplot.py Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/plotting/scatterplot.py Wed Jul 06 09:45:41 2011 +1000 @@ -19,14 +19,8 @@ title = sys.argv[5] xlab = sys.argv[6] ylab = sys.argv[7] - out_type = sys.argv[8] - out_width = int(sys.argv[9]) - out_height = int(sys.argv[10]) - point_size = float(sys.argv[11]) - - xvec=[] - yvec=[] + matrix = [] skipped_lines = 0 first_invalid_line = 0 invalid_value = '' @@ -34,19 +28,17 @@ i = 0 for i, line in enumerate( file( in_fname ) ): valid = True - vals = [] line = line.rstrip( '\r\n' ) if line and not line.startswith( '#' ): row = [] fields = line.split( "\t" ) - for c,column in enumerate(columns): + for column in columns: try: val = fields[column] if val.lower() == "na": - v = float( "nan" ) + row.append( float( "nan" ) ) else: - v = float( fields[column] ) - vals.append(val) + row.append( float( fields[column] ) ) except: valid = False skipped_lines += 1 @@ -65,19 +57,12 @@ first_invalid_line = i+1 if valid: - xvec.append(vals[0]) - yvec.append(vals[1]) + matrix.append( row ) + if skipped_lines < i: try: - if out_type == "jpg": - r.jpeg(out_fname,width=out_width,height=out_height) - elif out_type == "png": - # type="cairo" needed to be set for headless servers - r.png(out_fname,type="cairo",width=out_width,height=out_height) - else: - r.pdf(out_fname, out_width, out_height) - - r.plot(xvec,yvec, type="p", main=title, xlab=xlab, ylab=ylab, col="blue", pch=19,cex=point_size ) + r.pdf( out_fname, 8, 8 ) + r.plot( array( matrix ), type="p", main=title, xlab=xlab, ylab=ylab, col="blue", pch=19 ) r.dev_off() except Exception, exc: stop_err( "%s" %str( exc ) ) --- a/tools/plotting/scatterplot.xml Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/plotting/scatterplot.xml Wed Jul 06 09:45:41 2011 +1000 @@ -1,6 +1,6 @@ <tool id="scatterplot_rpy" name="Scatterplot"><description>of two numeric columns</description> - <command interpreter="python">scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab" $output_format $out_width $out_height $point_size</command> + <command interpreter="python">scatterplot.py $input $out_file1 $col1 $col2 "$title" "$xlab" "$ylab"</command><inputs><param name="input" type="data" format="tabular" label="Dataset" help="Dataset missing? See TIP below"/><param name="col1" type="data_column" data_ref="input" numerical="True" label="Numerical column for x axis" /> @@ -8,26 +8,15 @@ <param name="title" size="30" type="text" value="Scatterplot" label="Plot title"/><param name="xlab" size="30" type="text" value="V1" label="Label for x axis"/><param name="ylab" size="30" type="text" value="V2" label="Label for y axis"/> - <param name="output_format" type="select" label="Output format"> - <option value="pdf">pdf</option> - <option value="png">png</option> - <option value="jpg">jpg</option> - </param> - <param name="out_width" size="4" type="integer" value="8" label="Width (pdf=inches, image=pixels)"/> - <param name="out_height" size="4" type="integer" value="8" label="Height (pdf=inches, image=pixels)"/> - <param name="point_size" size="4" type="float" value="0.2" label="Point Size"/></inputs><outputs> - <data format="pdf" name="out_file1"> - <change_format> - <when input="output_format" value="png" format="png" /> - <when input="output_format" value="jpg" format="jpg" /> - </change_format> - </data> + <data format="pdf" name="out_file1" /></outputs><requirements><requirement type="python-module">rpy</requirement></requirements> + <!-- TODO: uncomment the following test when we have tools.update_state() working for + multiple dependents with the same dependency. <tests><test><param name="input" value="scatterplot_in1.tabular" ftype="tabular"/> @@ -36,38 +25,8 @@ <param name="title" value="Scatterplot"/><param name="xlab" value="V1"/><param name="ylab" value="V2"/> - <param name="out_width" value="8"/> - <param name="out_height" value="8"/> - <param name="point_size" value="0.5"/> - <param name="output_format" value="pdf" /><output name="out_file1" file="scatterplot_out1.pdf" /></test> - <test> - <param name="input" value="scatterplot_in1.tabular" ftype="tabular"/> - <param name="col1" value="2"/> - <param name="col2" value="3"/> - <param name="title" value="Scatterplot"/> - <param name="xlab" value="V1"/> - <param name="ylab" value="V2"/> - <param name="out_width" value="800"/> - <param name="out_height" value="600"/> - <param name="point_size" value="0.5"/> - <param name="output_format" value="png" /> - <output name="out_file1" file="scatterplot_out1.png" /> - </test> - <test> - <param name="input" value="scatterplot_in1.tabular" ftype="tabular"/> - <param name="col1" value="2"/> - <param name="col2" value="3"/> - <param name="title" value="Scatterplot"/> - <param name="xlab" value="V1"/> - <param name="ylab" value="V2"/> - <param name="out_width" value="800"/> - <param name="out_height" value="600"/> - <param name="point_size" value="0.5"/> - <param name="output_format" value="jpg" /> - <output name="out_file1" file="scatterplot_out1.jpg" /> - </test></tests> --><help> --- a/tools/samtools/bam_to_sam.py Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/samtools/bam_to_sam.py Wed Jul 06 09:45:41 2011 +1000 @@ -21,6 +21,7 @@ parser = optparse.OptionParser() parser.add_option( '', '--input1', dest='input1', help='The input SAM dataset' ) parser.add_option( '', '--output1', dest='output1', help='The output BAM dataset' ) + parser.add_option( '', '--header', dest='header', action='store_true', default=False, help='Write SAM Header' ) ( options, args ) = parser.parse_args() # output version # of tool @@ -87,7 +88,11 @@ try: # Extract all alignments from the input BAM file to SAM format ( since no region is specified, all the alignments will be extracted ). - command = 'samtools view -o -h %s %s' % ( options.output1, tmp_sorted_aligns_file_name ) + if options.header: + view_options = "-h" + else: + view_options = "" + command = 'samtools view %s -o %s %s' % ( view_options, options.output1, tmp_sorted_aligns_file_name ) tmp = tempfile.NamedTemporaryFile( dir=tmp_dir ).name tmp_stderr = open( tmp, 'wb' ) proc = subprocess.Popen( args=command, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno() ) --- a/tools/samtools/sam_bitwise_flag_filter.py Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/samtools/sam_bitwise_flag_filter.py Wed Jul 06 09:45:41 2011 +1000 @@ -1,6 +1,6 @@ #!/usr/bin/env python # Refactored on 11/13/2010 by Kanwei Li -# Added drop_header option - default is now keep headers for downstream sanity by ross lazarus + import sys import optparse @@ -14,11 +14,7 @@ options (listed below) default to 'None' if omitted """ parser = optparse.OptionParser(usage=usage) - parser.add_option('--drop_header', - action = 'store_true', - dest='drop_header', - help="Remove sam header - you probably NEVER want this for fussy downstream tools") - + parser.add_option( '--0x0001','--is_paired', choices = ( '0','1' ), @@ -133,24 +129,21 @@ opt_map = { '0': False, '1': True } used_indices = [(index, opt_map[opt]) for index, opt in enumerate(opt_ary) if opt is not None] flag_col = int( options.flag_col ) - 1 + for line in infile: line = line.rstrip( '\r\n' ) - if line: - if line.startswith('@'): - if not options.drop_header: - print line # usually want these so add -h if you don't want headers - elif not line.startswith( '#' ) : - fields = line.split( '\t' ) - flags = int( fields[flag_col] ) + if line and not line.startswith( '#' ) and not line.startswith( '@' ) : + fields = line.split( '\t' ) + flags = int( fields[flag_col] ) - valid_line = True - for index, opt_bool in used_indices: - if bool(flags & 0x0001 << index) != opt_bool: - valid_line = False - break + valid_line = True + for index, opt_bool in used_indices: + if bool(flags & 0x0001 << index) != opt_bool: + valid_line = False + break - if valid_line: - print line + if valid_line: + print line if __name__ == "__main__": main() --- a/tools/samtools/sam_bitwise_flag_filter.xml Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/samtools/sam_bitwise_flag_filter.xml Wed Jul 06 09:45:41 2011 +1000 @@ -1,11 +1,8 @@ -<tool id="sam_bw_filter" name="Filter SAM" version="1.0.1"> +<tool id="sam_bw_filter" name="Filter SAM" version="1.0.0"><description>on bitwise flag values</description><parallelism method="basic"></parallelism><command interpreter="python"> sam_bitwise_flag_filter.py - #if $drop_header == "1": - --drop_header - #end if --input_sam_file=$input1 --flag_column=2 #for $bit in $bits @@ -15,11 +12,6 @@ </command><inputs><param format="sam" name="input1" type="data" label="Select dataset to filter"/> - <param name="drop_header" type="select" display="radio" label="DROP sam headers" - help="Set this if you REALLY want to throw away existing sam header metadata - downstream (eg Picard) tools often demand it" > - <option value="0" selected="true">Keep headers (default)</option> - <option value="1">Drop headers</option> - </param><repeat name="bits" title="Flag"><param name="flags" type="select" label="Type"><option value="--0x0001">Read is paired</option> --- a/tools/samtools/sam_to_bam.py Tue Jul 05 11:42:56 2011 -0400 +++ b/tools/samtools/sam_to_bam.py Wed Jul 06 09:45:41 2011 +1000 @@ -68,7 +68,7 @@ # and the equCab2.fa file will contain fasta sequences. seq_path = check_seq_file( options.dbkey, cached_seqs_pointer_file ) tmp_dir = tempfile.mkdtemp() - if options.ref_file == 'None': + if not options.ref_file or options.ref_file == 'None': # We're using locally cached reference sequences( e.g., /galaxy/data/equCab2/sam_index/equCab2.fa ). # The indexes for /galaxy/data/equCab2/sam_index/equCab2.fa will be contained in # a file named /galaxy/data/equCab2/sam_index/equCab2.fa.fai @@ -125,9 +125,7 @@ tmp_aligns_file = tempfile.NamedTemporaryFile( dir=tmp_dir ) tmp_aligns_file_name = tmp_aligns_file.name tmp_aligns_file.close() - # IMPORTANT NOTE: for some reason the samtools view command gzips the resulting bam file without warning, - # and the docs do not currently state that this occurs ( very bad ). - command = 'samtools view -h -bt %s -o %s %s' % ( fai_index_file_path, tmp_aligns_file_name, options.input1 ) + command = 'samtools view -bt %s -o %s %s' % ( fai_index_file_path, tmp_aligns_file_name, options.input1 ) tmp = tempfile.NamedTemporaryFile( dir=tmp_dir ).name tmp_stderr = open( tmp, 'wb' ) proc = subprocess.Popen( args=command, shell=True, cwd=tmp_dir, stderr=tmp_stderr.fileno() ) @@ -147,8 +145,6 @@ tmp_stderr.close() if returncode != 0: raise Exception, stderr - if len( open( tmp_aligns_file_name ).read() ) == 0: - raise Exception, 'Initial BAM file empty' except Exception, e: #clean up temp files if os.path.exists( tmp_dir ): @@ -188,11 +184,6 @@ stop_err( 'Error sorting alignments from (%s), %s' % ( tmp_aligns_file_name, str( e ) ) ) # Move tmp_aligns_file_name to our output dataset location sorted_bam_file = '%s.bam' % tmp_sorted_aligns_file_name - if os.path.getsize( sorted_bam_file ) == 0: - #clean up temp files - if os.path.exists( tmp_dir ): - shutil.rmtree( tmp_dir ) - stop_err( 'Error creating sorted version of BAM file' ) shutil.move( sorted_bam_file, options.output1 ) #clean up temp files if os.path.exists( tmp_dir ): @@ -201,6 +192,6 @@ if os.path.getsize( options.output1 ) > 0: sys.stdout.write( 'SAM file converted to BAM' ) else: - stop_err( 'The output file is empty, there may be an error with your input file or settings.' ) + stop_err( 'Error creating sorted version of BAM file.' ) if __name__=="__main__": __main__() Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
Bitbucket