I hereby claim:
- I am peterjc on github.
- I am pjacock (https://keybase.io/pjacock) on keybase.
- I have a public key ASDyMh8PfhtgajUDmucW2sUhci9kIZ5U2TywiDd5GKUlyAo
To claim this, I am signing this object:
#!/usr/bin/env python | |
# Copyright 2021-2024 by Peter Cock, The James Hutton Institute. | |
# All rights reserved. | |
# This file is released under the "MIT License Agreement". | |
"""Python script to keep GitHub mirrors in sync with upstream. | |
Mirror mirror on the wall, who's the newest of them all? | |
Usage: |
#!/bin/bash | |
set -euo pipefail | |
# See https://blastedbio.blogspot.co.uk/2016/05/sync-github-mirror-with-cron.html and | |
# https://gist.github.com/peterjc/eccac1942a9709993040425d33680352 for mirroring script | |
# | |
# Usage: | |
# | |
# 1. Fork upstream repo under HuttonICS, disable wiki, projects, issues etc. Protect master branch. | |
# 2. Run: |
I hereby claim:
To claim this, I am signing this object:
# Copyright 2016 Peter Cock, James Hutton Institute. | |
# All Rights Reserved. | |
# Released as open source under the MIT license. | |
"""Update URLs in Galaxy tool_dependencies.xml files | |
Assumes have a copy of the urls.tsv file from | |
https://github.com/galaxyproject/cargo-port/blob/master/urls.tsv | |
This file defines the https://depot.galaxyproject.org/software/ | |
URL naming used for caching Galaxy dependencies. |
#!/bin/bash | |
# Enable strict bash mode - halts on any error | |
set -euo pipefail | |
# Takes exactly three command line arguments: | |
git_dir=$1 | |
ssh_key=$2 | |
log_file=$3 |
# | |
# A hack, loosly based on Eric Rasche's disgusting.py | |
# https://gist.github.com/erasche/4ac3448b036f09979e14 | |
# | |
# Intended as a one-off use script to help with syncing local | |
# .shed.yml files with a Galaxy Tool Shed. See also: | |
# https://gist.github.com/peterjc/5ebbf446d799f3aaa639 | |
import yaml | |
import os |
from Bio import SeqIO | |
with open("CP008802.txt", "w") as output: | |
output.write("Seqname\tSource\tfeature\tStart\tEnd\tScore\tStrand\tFrame\tAttributes\n") | |
for record in SeqIO.parse("CP008802.gbk", "genbank"): | |
print("Converting %s" % record.name) | |
for f in record.features: | |
if f.type != "gene": | |
continue | |
locus_tag = f.qualifiers["locus_tag"][0] | |
if len(f.location.parts) > 1: |
# Walks specified folders looking for .shed.yml files, | |
# with at least owner and name given. | |
# | |
# Matches the owner/name with the remote Tool Shed, and | |
# takes any missing meta-data from the remote Tool Shed. | |
# | |
# Pre-existing local data otherwise should be preserved. | |
# | |
# Does the yaml dump with some hackery because I couldn't | |
# work out how to make the library use the layout I wanted. |
#!/usr/bin/env python | |
"""Galaxy Tool Shed diff command.""" | |
import sys | |
import os | |
import subprocess | |
import tempfile | |
from optparse import OptionParser | |
VERSION = "v0.0.1" |