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
1. export GOPATH='~/Desktop/go/project' #set the GOPATH to the pwd | |
2. mkdir -p $GOPATH/{bin,pkg,src} #create the required subdirectory sturcture: {bin,pkg,src} | |
3. tree $GOPATH | |
/Users/Tim/Desktop/go/project | |
├── bin | |
├── pkg | |
└── src | |
4. mkdir $GOPATH/src/my_new_package #create a package folder with the same name as the package itself | |
5. touch $GOPATH/src/my_new_package/my_new_package.go |
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
Show hidden characters
{ | |
"cmd": ["go run '${file}'"], | |
"selector": "source.go", | |
"path": "/usr/local/go/bin", | |
"shell": true | |
} |
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
ruby -e '["a","b","c"].each {|q| puts `echo this is a test in A b sentenCe. | agrep -i --show-position --color "#{q}" `}' |
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
#Here is a quick implementation of pattern matching for cases in ruby | |
module WildcardFunctionality | |
class Wildcard | |
def ==(other) | |
true | |
end | |
end | |
def _ | |
Wildcard.new |
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
% paste mapped_PRRC2A.txt mapped_PRRC2B.txt mapped_PRRC2C.txt | column -s $'\t' -t > all_mapped_order_CBA.txt% head !$head all_mapped_order_CBA.txt | |
1 M 0 1 M 0 1 M 0 | |
2 S 0 2 S 0 2 S 0 | |
3 D 0 3 D 0 3 E 0 | |
4 R 0 4 R 0 4 K 0 | |
5 S 0 5 L 1 | 5 S 0 | |
6 G 0 6 G 1 | 6 G 0 | |
7 P 0 7 Q 1 | 7 Q 0 | |
8 T 0 8 I 1 | 8 S 0 | |
9 A 0 9 T 1 | 9 T 0 |
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
#command-line usage: | |
#% ruby /Users/timrand/Dropbox/NAT1/peptide_mapper3.rb peptide_file target_file | |
# 1 M 0 | |
# 2 S 0 | |
# 3 P 8 [][][][][][][][] | |
# 4 A 8 [][][][][][][][] | |
# 5 G 8 [][][][][][][][] | |
# 6 S 8 [][][][][][][][] | |
# 7 C 8 [][][][][][][][] | |
# 8 D 8 [][][][][][][][] |
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
#command-line usage: | |
#% ruby /Users/timrand/Dropbox/NAT1/peptide_mapper3.rb peptide_file target_file | |
# 1 M 0 | |
# 2 S 0 | |
# 3 P 8 [][][][][][][][] | |
# 4 A 8 [][][][][][][][] | |
# 5 G 8 [][][][][][][][] | |
# 6 S 8 [][][][][][][][] | |
# 7 C 8 [][][][][][][][] | |
# 8 D 8 [][][][][][][][] |
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
#command-line usage: | |
#% ruby /Users/timrand/Dropbox/NAT1/peptide_mapper3.rb peptide_file target_file | |
# 1 M 0 | |
# 2 S 0 | |
# 3 P 8 [][][][][][][][] | |
# 4 A 8 [][][][][][][][] | |
# 5 G 8 [][][][][][][][] | |
# 6 S 8 [][][][][][][][] | |
# 7 C 8 [][][][][][][][] | |
# 8 D 8 [][][][][][][][] |
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
#command-line usage: | |
#% ruby /Users/timrand/Dropbox/NAT1/peptide_mapper3.rb peptide_file target_file | |
# 1 M 0 | |
# 2 S 0 | |
# 3 P 8 [][][][][][][][] | |
# 4 A 8 [][][][][][][][] | |
# 5 G 8 [][][][][][][][] | |
# 6 S 8 [][][][][][][][] | |
# 7 C 8 [][][][][][][][] | |
# 8 D 8 [][][][][][][][] |
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
1. Created a script for stripping out the urls for genbank files. | |
#IRES_PLASMID_SCRAPER.rb | |
pwd = "/Users/timrand/Dropbox/NAT1/" | |
file = pwd + "IRES_plasmids.txt" | |
website_url = "http://iresite.org/IRESite_web.php?page=gb_download&file=" | |
out_file = pwd + "ires_plasmid_urls.txt" | |
f = File.read(file) |