changeset 5:efba05717d10 draft

Deleted selected files
author triasteran
date Tue, 22 Feb 2022 16:30:10 +0000
parents 9e7a38ba91e8
children 140d17c88242
files BamToBigWig_planemo/.shed.yml BamToBigWig_planemo/bam2bigwig.xml BamToBigWig_planemo/bam_to_bigwig_py3.py
diffstat 3 files changed, 0 insertions(+), 159 deletions(-) [+]
line wrap: on
line diff
--- a/BamToBigWig_planemo/.shed.yml	Tue Feb 22 16:17:50 2022 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-categories: [Transcriptomics]
-description: riboseq_bam_to_bigwig_for_gwips
-name: bam_to_bigwig
-owner: triasteran
--- a/BamToBigWig_planemo/bam2bigwig.xml	Tue Feb 22 16:17:50 2022 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-<tool id="bam2bigwig" name="Convert Bam to BigWig" version="0.1.1" python_template_version="3.5">
-    <requirements>
-        <requirement type="package" version="0.18.0">pysam</requirement>
-        <requirement type="package" version="2.30.0">bedtools</requirement>
-        <requirement type="package" version="377">ucsc-bedgraphtobigwig</requirement>        
-    </requirements>
-    <command detect_errors="exit_code"><![CDATA[
-       python3 '$__tool_directory__/bam_to_bigwig.py3' '$input1' --outfile=$output1
-    ]]></command>
-    <inputs>
-        <param type="data" name="input1" format="bam" />
-    </inputs>
-    <outputs>
-        <data name="output1" format="bigwig" />
-    </outputs>
-    <tests>
-        <test>
-            <param name="input1" value="file.bam"/>
-            <output name="output1" file="out.bigwig"/>
-        </test>
-    </tests>
-    <help>
-      <![CDATA[
-Convert BAM files to BigWig file format in a specified region.
-
-Usage:
-    bam_to_wiggle.py <BAM file> <YAML config> --outfile=<output file name> ]]>
-    </help>
-    <citations>
-        <citation type="bibtex">
-           @misc{githubbam_to_bigwig,
-  author = {Audrey},
-  year = {2022},
-  title = {bam_to_bigwig},
-  publisher = {GitHub},
-  journal = {GitHub repository},
-  url = {https://github.com/triasteran/RiboGalaxy_tools}, }
-        </citation>
-    </citations>
-</tool>
--- a/BamToBigWig_planemo/bam_to_bigwig_py3.py	Tue Feb 22 16:17:50 2022 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-#!/usr/bin/env python
-#Original version copyright Brad Chapman with revisions from Peter Cock
-#and ideas from Lance Parsons
-"""Convert BAM files to BigWig file format in a specified region.
-
-Usage:
-    bam_to_wiggle.py <BAM file> [<YAML config>] [--outfile=<output file name>]
-
-The optional config file (not used by the Galaxy interface) is in YAML format
-and specifies the location of the binary tools.
-
-program:
-  bedtools_genomeCoverageBed: genomeCoverageBed
-  ucsc_bedGraphToBigWig: bedGraphToBigWig
-
-If not specified, these will be assumed to be present in the system path.
-
-The script requires:
-    pysam (http://code.google.com/p/pysam/)
-    genomeCoverageBed from BedTools (http://code.google.com/p/bedtools/)
-    bedGraphToBigWig from UCSC (http://hgdownload.cse.ucsc.edu/admin/exe/)
-If a configuration file is used, then PyYAML is also required (http://pyyaml.org/)
-"""
-import os
-import sys
-import subprocess
-import tempfile
-from optparse import OptionParser
-from contextlib import contextmanager, closing
-
-import pysam
-
-def main(bam_file, config_file=None, outfile=None, split=False):
-    if config_file:
-        import yaml
-        with open(config_file) as in_handle:
-            config = yaml.load(in_handle)
-    else:
-        config = {"program": {"ucsc_bedGraphToBigWig" : "bedGraphToBigWig",
-                              "bedtools_genomeCoverageBed" : "genomeCoverageBed"}}
-    if outfile is None:
-        outfile = "%s.bigwig" % os.path.splitext(bam_file)[0]
-    if os.path.abspath(bam_file) == os.path.abspath(outfile):
-        sys.stderr.write("Bad arguments, input and output files are the same.\n")
-        sys.exit(1)
-    if os.path.exists(outfile) and os.path.getsize(outfile) > 0:
-        sys.stderr.write("Warning, output file already exists.\n")
-
-    sizes = get_sizes(bam_file, config)
-    #print ("Have %i references" % len(sizes))
-    if not sizes:
-        sys.stderr.write("Problem reading BAM header.\n")
-        sys.exit(1)
-
-    #Use a temp file to avoid any possiblity of not having write permission
-    temp_handle = tempfile.NamedTemporaryFile(delete=False)
-    temp_file = temp_handle.name
-    with closing(temp_handle):
-        print ("Calculating coverage...")
-        convert_to_graph(bam_file, split, config, temp_handle)
-    try:
-        print ("Converting %i MB graph file to bigwig..." % (os.path.getsize(temp_file) // (1024*1024)))
-        #Can't pipe this as stdin due to converter design,
-        #https://lists.soe.ucsc.edu/pipermail/genome/2011-March/025455.html
-        convert_to_bigwig(temp_file, sizes, config, outfile)
-    finally:
-        if os.path.isfile(temp_file):
-            os.remove(temp_file)
-    print ("Done")
-
-@contextmanager
-def indexed_bam(bam_file, config):
-    if not os.path.exists(bam_file + ".bai"):
-        pysam.index(bam_file)
-    sam_reader = pysam.Samfile(bam_file, "rb")
-    yield sam_reader
-    sam_reader.close()
-
-def get_sizes(bam_file, config):
-    with indexed_bam(bam_file, config) as work_bam:
-        sizes = zip(work_bam.references, work_bam.lengths)
-    return sizes
-
-def convert_to_graph(bam_file, split, config, out_handle):
-    cl = [config["program"]["bedtools_genomeCoverageBed"], "-ibam", bam_file, "-bg"]
-    if split:
-        cl.append("-split")
-    subprocess.check_call(cl, stdout=out_handle)
-
-def convert_to_bigwig(bedgraph_file, chr_sizes, config, bw_file):
-    #This will be fine under Galaxy, but could use temp folder?
-    size_file = "%s-sizes.txt" % (os.path.splitext(bw_file)[0])
-    with open(size_file, "w") as out_handle:
-        for chrom, size in chr_sizes:
-            out_handle.write("%s\t%s\n" % (chrom, size))
-    try:
-        cl = [config["program"]["ucsc_bedGraphToBigWig"], bedgraph_file, size_file, bw_file]
-        subprocess.check_call(cl)
-    finally:
-        os.remove(size_file)
-    return bw_file
-
-if __name__ == "__main__":
-    parser = OptionParser()
-    parser.add_option("-o", "--outfile", dest="outfile")
-    parser.add_option("-s", "--split", action="store_true", dest="split")
-    (options, args) = parser.parse_args()
-    if len(args) not in [1, 2]:
-        print ("Incorrect arguments")
-        print (__doc__)
-        sys.exit()
-    kwargs = dict(
-        outfile=options.outfile,
-        split=options.split)
-    main(*args, **kwargs)
PKN2B9n0 s_mart-769e306b7933/SMART/Java/Python/.gitignoreUTPPKN2B] < 큁s_mart-769e306b7933/SMART/Java/Python/CleanTranscriptFile.pyUTPPKN2B( !9 큦s_mart-769e306b7933/SMART/Java/Python/ClusterizeByTags.pyUTPPKN2B)B 6 >s_mart-769e306b7933/SMART/Java/Python/CollapseReads.pyUTPPKN2Bco4 큨s_mart-769e306b7933/SMART/Java/Python/CombineTags.pyUTPPKN2BLcW; +$s_mart-769e306b7933/SMART/Java/Python/CompareOverlapping.pyUTPPKN2Bu_o q&E 큹9s_mart-769e306b7933/SMART/Java/Python/CompareOverlappingSmallQuery.pyUTPPKN2BO %C 큤Es_mart-769e306b7933/SMART/Java/Python/CompareOverlappingSmallRef.pyUTPPKN2Bq978 mQs_mart-769e306b7933/SMART/Java/Python/ComputeCoverage.pyUTPPKN2B[-q; Zs_mart-769e306b7933/SMART/Java/Python/CountReadGCPercent.pyUTPPKN2B|JF8: E_s_mart-769e306b7933/SMART/Java/Python/FindOverlapsOptim.pyUTPPKN2B *uVB 큘os_mart-769e306b7933/SMART/Java/Python/GetDifferentialExpression.pyUTPPKN2Bb>8 큽s_mart-769e306b7933/SMART/Java/Python/GetDistribution.pyUTPPKN2B5ͼ /4 s_mart-769e306b7933/SMART/Java/Python/GetFlanking.pyUTPPKN2BM:/8 <s_mart-769e306b7933/SMART/Java/Python/GetRandomSubset.pyUTPPKN2B߯pzV6< 큖s_mart-769e306b7933/SMART/Java/Python/GetReadDistribution.pyUTPPKN2By"105 큃s_mart-769e306b7933/SMART/Java/Python/GetReadSizes.pyUTPPKN2BT*` 8 s_mart-769e306b7933/SMART/Java/Python/GetUpDownStream.pyUTPPKN2B /= s_mart-769e306b7933/SMART/Java/Python/RestrictFromCoverage.pyUTPPKN2BnBl4 Qs_mart-769e306b7933/SMART/Java/Python/SelectByTag.pyUTPPKN2B/$"= (s_mart-769e306b7933/SMART/Java/Python/WrappGetDistribution.pyUTPPKN2BA A s_mart-769e306b7933/SMART/Java/Python/WrappGetReadDistribution.pyUTPPKN2BI3: 1s_mart-769e306b7933/SMART/Java/Python/WrappPlotCoverage.pyUTPPKN2BtM = xs_mart-769e306b7933/SMART/Java/Python/WrappPlotRepartition.pyUTPPKN2B1 s_mart-769e306b7933/SMART/Java/Python/__init__.pyUTPPKN2B"o2 Vs_mart-769e306b7933/SMART/Java/Python/__init__.pycUTPPKN2Bö8 .s_mart-769e306b7933/SMART/Java/Python/adaptorStripper.pyUTPPKN2Bڝ%': S s_mart-769e306b7933/SMART/Java/Python/changeGffFeatures.shUTPPKN2B3ګ6 s_mart-769e306b7933/SMART/Java/Python/changeTagName.pyUTPPKN2B˰~ 1 s_mart-769e306b7933/SMART/Java/Python/cleanGff.pyUTPPKN2B9n @ s_mart-769e306b7933/SMART/Java/Python/cleaning/CleanerChooser.pyUTPPKN2Bke@ !s_mart-769e306b7933/SMART/Java/Python/cleaning/DefaultCleaner.pyUTPPKN2B?{k< 7%s_mart-769e306b7933/SMART/Java/Python/cleaning/GffCleaner.pyUTPPKN2Bs:C< -s_mart-769e306b7933/SMART/Java/Python/cleaning/GtfCleaner.pyUTPPKN2Bc~; G E4s_mart-769e306b7933/SMART/Java/Python/cleaning/TranscriptListCleaner.pyUTPPKN2B: 8s_mart-769e306b7933/SMART/Java/Python/cleaning/__init__.pyUTPPKN2B}ۣ v3 q9s_mart-769e306b7933/SMART/Java/Python/clusterize.pyUTPPKN2B8>bEC ~Cs_mart-769e306b7933/SMART/Java/Python/clusterizeBySlidingWindows.pyUTPPKN2B ); ZTs_mart-769e306b7933/SMART/Java/Python/compareOverlapping.pyUTPPKN2B1 +=> t^s_mart-769e306b7933/SMART/Java/Python/convertTranscriptFile.pyUTPPKN2B zxv > 큒fs_mart-769e306b7933/SMART/Java/Python/coordinatesToSequence.pyUTPPKN2B55 }ls_mart-769e306b7933/SMART/Java/Python/fastqToFasta.pyUTPPKN2B[0 rs_mart-769e306b7933/SMART/Java/Python/findTss.pyUTPPKN2BlPA`bm- 'zs_mart-769e306b7933/SMART/Java/Python/fold.pyUTPPKN2B͓U 6 s_mart-769e306b7933/SMART/Java/Python/getDifference.pyUTPPKN2B JH 44 큯s_mart-769e306b7933/SMART/Java/Python/getDistance.pyUTPPKN2BA p@8 s_mart-769e306b7933/SMART/Java/Python/getDistribution.pyUTPPKN2BuZP<*3 s_mart-769e306b7933/SMART/Java/Python/getElement.pyUTPPKN2B%1 Us_mart-769e306b7933/SMART/Java/Python/getExons.pyUTPPKN2BX2 '; Ds_mart-769e306b7933/SMART/Java/Python/getInfoPerCoverage.pyUTPPKN2B-~3 s_mart-769e306b7933/SMART/Java/Python/getIntrons.pyUTPPKN2B{p> s_mart-769e306b7933/SMART/Java/Python/getLetterDistribution.pyUTPPKN2BޮsE. s_mart-769e306b7933/SMART/Java/Python/getNb.pyUTPPKN2Bv4 .9 s_mart-769e306b7933/SMART/Java/Python/getRandomRegions.pyUTPPKN2B0K,r< 큆s_mart-769e306b7933/SMART/Java/Python/getReadDistribution.pyUTPPKN2B86 4 %s_mart-769e306b7933/SMART/Java/Python/getSequence.pyUTPPKN2B-p U)1 s_mart-769e306b7933/SMART/Java/Python/getSizes.pyUTPPKN2BDg3 Ls_mart-769e306b7933/SMART/Java/Python/getWigData.pyUTPPKN2BjBri7 s_mart-769e306b7933/SMART/Java/Python/getWigDistance.pyUTPPKN2B[vKQ !6 s_mart-769e306b7933/SMART/Java/Python/getWigProfile.pyUTPPKN2B|p^7 is_mart-769e306b7933/SMART/Java/Python/mapperAnalyzer.pyUTPPKN2B́%= 큪0s_mart-769e306b7933/SMART/Java/Python/mappingToCoordinates.pyUTPPKN2Bʠ[rD 7s_mart-769e306b7933/SMART/Java/Python/mergeSlidingWindowsClusters.pyUTPPKN2By/0 #= @s_mart-769e306b7933/SMART/Java/Python/mergeTranscriptLists.pyUTPPKN2BB8R> VKs_mart-769e306b7933/SMART/Java/Python/misc/MultipleRPlotter.pyUTPPKN2BG6 Ss_mart-769e306b7933/SMART/Java/Python/misc/Progress.pyUTPPKN2B 7 Ys_mart-769e306b7933/SMART/Java/Python/misc/Progress.pycUTPPKN2B^ukp6 V^s_mart-769e306b7933/SMART/Java/Python/misc/RPlotter.pyUTPPKN2B@ Az ? ws_mart-769e306b7933/SMART/Java/Python/misc/UnlimitedProgress.pyUTPPKN2B @ *}s_mart-769e306b7933/SMART/Java/Python/misc/UnlimitedProgress.pycUTPPKN2B 3 큩s_mart-769e306b7933/SMART/Java/Python/misc/Utils.pyUTPPKN2B 4 s_mart-769e306b7933/SMART/Java/Python/misc/Utils.pycUTPPKN2B6 (s_mart-769e306b7933/SMART/Java/Python/misc/__init__.pyUTPPKN2B;9t7 s_mart-769e306b7933/SMART/Java/Python/misc/__init__.pycUTPPKN2BH= ys_mart-769e306b7933/SMART/Java/Python/misc/test/Test_Utils.pyUTPPKN2B; 큭s_mart-769e306b7933/SMART/Java/Python/misc/test/__init__.pyUTPPKN2Bj4 !s_mart-769e306b7933/SMART/Java/Python/modifyFasta.pyUTPPKN2BdkA s_mart-769e306b7933/SMART/Java/Python/modifyGenomicCoordinates.pyUTPPKN2B1;; 큊s_mart-769e306b7933/SMART/Java/Python/modifySequenceList.pyUTPPKN2Bv;~> үs_mart-769e306b7933/SMART/Java/Python/mySql/MySqlConnection.pyUTPPKN2B ʛQ= 큂s_mart-769e306b7933/SMART/Java/Python/mySql/MySqlExonTable.pyUTPPKN2B o/ > s_mart-769e306b7933/SMART/Java/Python/mySql/MySqlExonTable.pycUTPPKN2BBZ 9 us_mart-769e306b7933/SMART/Java/Python/mySql/MySqlQuery.pyUTPPKN2B= b 909 큋s_mart-769e306b7933/SMART/Java/Python/mySql/MySqlTable.pyUTPPKN2Bh_b/: ]s_mart-769e306b7933/SMART/Java/Python/mySql/MySqlTable.pycUTPPKN2B:#$nC 큨s_mart-769e306b7933/SMART/Java/Python/mySql/MySqlTranscriptTable.pyUTPPKN2B/D s_mart-769e306b7933/SMART/Java/Python/mySql/MySqlTranscriptTable.pycUTPPKN2B7 큏s_mart-769e306b7933/SMART/Java/Python/mySql/__init__.pyUTPPKN2B?u8 s_mart-769e306b7933/SMART/Java/Python/mySql/__init__.pycUTPPKN2BcM s_mart-769e306b7933/SMART/Java/Python/mySql/test/Test_MySqlTranscriptTable.pyUTPPKN2B< s_mart-769e306b7933/SMART/Java/Python/mySql/test/__init__.pyUTPPKN2BIz? 큍s_mart-769e306b7933/SMART/Java/Python/ncList/ConvertToNCList.pyUTPPK\\z(