I recently wrote another script (that no one will ever use, most likely) that I wanted to release under an open source license. I hoped onto Google Code, but rather than choose SVN for my version control system, I selected Git on a whim. I’d been meaning to give it a try.
I was surprised to find that git wasn’t installed automatically with Mac OS X. I had to grab an older version from here, since I’m a bit behind the times with my operating system. This installed git at /usr/local/git/bin/git. So far so good.
I set up my ~/.netrc to have my Google login info:
$ cat ~/.netrc machine code.google.com login firstname.lastname@example.org password GOOGLEPASSWORD
I then cloned my new, empty repository with:
git clone https://email@example.com/p/bsnp-to-fasta-via-bed
Moved into the directory and copied the script there:
cd bsnp-to-fasta-via-bed/ cp ../BSNP_to_FASTA_via_BED.pl .
And then added it, committed it, and pushed it:
git add BSNP_to_FASTA_via_BED.pl git commit -m "Added script" git push origin master
And got an error. Luckily the answer was pretty easy to find and only involved removing “christina.bergey@” from my directory’s .git/config file. Done!
The script, BSNP-to-FASTA-via-BED.pl, (for the one other soul that might someday benefit from its existence) is a simple bit of Perl that takes as input a file of SNPs from the Bayesian SNP calling program BSNP and a BED file of intervals and outputs a FASTA file containing sequences for each of those intervals. It’s a bit kludgy, but it gets the job done. Plus, it was a nice excuse to try Git.