This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#get the command line arguments | |
input_file=$1 | |
divisor=$2 | |
#run wc on the file in argv[1] | |
size=`wc -l $input_file` | |
#split the return on whitespace - first word is now in | |
set $size | |
#get the intiger division of wc/divisor | |
part=$(($1/$divisor)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Read a fasta file and only keep the sequences with correct headers (id_pattern regex) | |
import re | |
import sys | |
seq_pattern = re.compile(r">[^>]+\n",re.MULTILINE) | |
id_pattern = re.compile(r"protein_id:(?P<id>[.\w]+)") | |
with open(sys.argv[1]) as f: | |
text = f.read() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import argparse | |
from Bio import SeqIO | |
parser=argparse.ArgumentParser() | |
parser.add_argument("inputFile", help="input fasta file") | |
parser.add_argument("outputFile",help="output file name") | |
parser.add_argument("sampleName",help="sample name to be removed") | |
args = parser.parse_args() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! /usr/bin/osascript | |
on run argv | |
set Volume (item 1 of argv) | |
end run |
NewerOlder