Skip to content

Instantly share code, notes, and snippets.

[Fri Apr 29 21:29:39 CEST 2016] picard.sam.markduplicates.MarkDuplicatesWithMateCigar INPUT=[/home/kong/Haiying/Projects/Melanoma/Primary/ILSE530X_B20/Lock/Picard/T15520.sorted.sam] OUTPUT=/home/kong/Haiying/Projects/Melanoma/Primary/ILS
E530X_B20/Lock/Picard/T15520.dedupped.bam METRICS_FILE=/home/kong/Haiying/Projects/Melanoma/Primary/ILSE530X_B20/Lock/Picard/T15520.metrics.txt REMOVE_DUPLICATES=true ASSUME_SORTED=true MINIMUM_DISTANCE=-1 SKIP_PAIRS_WITH_NO_MATE_CIGA
R=true BLOCK_SIZE=100000 DUPLICATE_SCORING_STRATEGY=TOTAL_MAPPED_REFERENCE_LENGTH PROGRAM_RECORD_ID=MarkDuplicates PROGRAM_GROUP_NAME=MarkDuplicatesWithMateCigar READ_NAME_REGEX=<optimized capture of last three ':' separated fields as nu
meric values> OPTICAL_DUPLICATE_PIXEL_DISTANCE=100 VERBOSITY=INFO QUIET=false VALIDATION_STRINGENCY=STRICT COMPRESSION_LEVEL=5 MAX_RECORDS_IN_RAM=500000 CREATE_INDEX=false CREATE_MD5_FILE=false GA4GH_CLIENT_SECRETS=client_secrets.json
[Fri Apr 29 21:29:39 CEST 2016] Executing as kong@hpc19 on Linux 3.2.53-1.e
#!/usr/bin/perl
use strict;
open( IN_P1, "/Users/John/Desktop/ENCFF001LCU.fq" ) or die "File not found";
$| = 1;
my $yup = 0;
my $barcode1 = 'AATTCCGGAATT';
my $barcode1_regex = make_barcode_fragments( $barcode1 );
while ( defined( my $firstp1 = <IN_P1> ) ) {
yup = 0
b = 'AATTCCGGAATT'
p = set([b])
for x in range(0,len(b)):
for x_val in ['A','C','G','T']:
for y in range(0,len(b)):
for y_val in ['A','C','G','T']:
temp = list(b)
temp[x],temp[y] = x_val,y_val
p.add( ''.join(temp) )
management localhost 6666 # Allows you to telnet into localhost 6666 to see the status. Although openvpn has logs, you can find out a lot more (like who is currently using on the VPN) through the management service
port 443 # By using port 443 for all of our VPN communications, our network traffic will look very similar to standard HTTPS traffic.
client-to-client # Allows two clients of the VPN to talk to one another (home computer to work computer for example)
keepalive 10 120 # Defaults
mssfix # Kept due to Cargo Cult reasons...
proto tcp # udp is faster, but so much less reliable its not worth it. Use TCP.
dev tun # We're making a tunnel so we want to make the tun kind of VPN.
ca ca.crt # we'll make this next
cert server.crt # we'll make this next
key server.key # we'll make this next
# STUFF YOU COULD CHANGE TO REFLECT YOUR SYSTEM BETTER:
export KEY_COUNTRY="UK"
export KEY_PROVINCE="London"
export KEY_CITY="London"
export KEY_ORG="MyVPN"
export KEY_EMAIL="my@email.com"
export KEY_OU="MyVPN"
# STUFF YOU SHOULDNT CHANGE
export EASY_RSA="/etc/openvpn/easy-rsa"
# Non-Windows only:
user nobody
group nogroup
# Common for everything else:
client
dev tun
proto tcp-client
remote 54.152.94.74 443
resolv-retry infinite
# Stuff you might have to change depending on your package manager the IP of your client:
# (these settings will work well for EC2 though)
Listen 10.8.0.1
User tinyproxy
Group tinyproxy
# More is better/faster:
MinSpareServers 10
MaxSpareServers 50
StartServers 25
import sys
reads = sys.argv[1]
index = sys.argv[2]
# Get all read ids:
all_readIDs = set() # Using a set because it will be quicker to find things in later.
# A list would require python to check every item in the list.
# A set can be thought of as an always-sorted list (elements are added in their sorted order) with no duplication of elements.
# The sorted order is based on the hash() value of the items however, which is essentially a random number.
import sys
reads = sys.argv[1]
index = sys.argv[2]
all_readIDs = set()
# Re-written the code below to only ever read the first row:
with open(reads, "r") as read_file:
while True:
try:
line1 = next(read_file)
class stat:
def __init__(self,INFO):
self.DESCRIPTION = ['Demo for harmbrugge', 'ENSMUSG00000051951']
self.LINKABLE = True
self.SQL = 'TEXT'
self.dependencies = ['CHR','POS','SEQ']
self.before = '''
import intervaltree
GTF_chromosomes = {}
with open('/Users/John/Downloads/Mus_musculus.GRCm38.86.gtf','rb') as f: