Archive for the ‘Uncategorized’ Category.

Basic bowtie2 alignment notes

It’s equally been a while since I’ve driven bowtie, and now there’s bowtie2. Basic alignment notes:

1
./bowtie2-build ~/genomics/myreferece.fasta myreference
1
./bowtie2 -x myreference -q myreads.fastq -S ./al.sam

And out pops a SAM file. This can be converted to a BAM with samtools:

1
2
./samtools faidx ~/genomics/myreference.fasta
./samtools import ~/genomics/myreference.fasta.fai ./al.sam ./al.bam

Using BLAST+ for nucleotide alignments

It’s quite some time since I needed to run BLAST locally on anything. Here are some quick notes.

First download BLAST:

1
2
3
wget ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.2.30+-x64-linux.tar.gz
tar xvzf ncbi-blast-2.2.30+-x64-linux.tar.gz
cd ncbi-blast-2.2.30+/bin

Create a new reference database:

1
./makeblastdb -in ~/genomics/myreference.fasta  -dbtype nucl

In my case I needed to align fastq files. However BLAST only takes fasta. I used to the following to convert the fastqs to fastas:

1
awk 'BEGIN{n=0;}{if(n%4 == 0) print ">" substr($0,2); if(n%4 == 1) print $0;n++;}' input.fastq > output.fasta

And finally run the alignment:

1
./blastn -db ~/genomics/myreference.fasta -query ./output.fasta

Interfacing Chuo Seiki stages

P1000665

I finally got a chance to setup the Chuo Seiki motorized stages I bought at auction a while back. The stages use oriental motor 5 phase stepper motors (PH533s). Of course, being second hand they didn’t come with any drivers, and stepper 5-phase drivers are far less common than 2-phase ones.

I picked up an oriental motor UDK5214NW 5-phase driver. Looking at the stage it seemed that only 5 wires went to the stepper, the rest go to limit switches (I assume optical). 5 wires doesn’t seem to match with the PH533 datasheet, and the colors didn’t match those shown on the driver but I tried wiring it up anyway (I assume it uses the wiring shown below).

The most painful part of the whole process is obtaining the connectors. The stage uses HR10A-10P-12S (Hirose) connectors which cost about 20USD each. The stepper driver uses a CN1 connector which also costs about 15USD. So for an XYZ stage you’re spending 100+USD on connectors alone. It would in fact be straight forward to hack the Hirose connectors off and stick D-type connectors on but I didn’t want to mess up the stages.

Pins 1 to 5 on the HR10A appear to go to the motor. I wired these through to the stepper driver ignoring the color coding on the driver. Somewhat surprisingly this worked.

Pins 1 and 2 rotate clockwise, 3 and 4 anti-clockwise. The inputs are opto-isolated, and require a ground and signal connection.

I tried the following stages: ALV-600-H1M, ALS-602-HOM and MMU-60X-H1. They all appear to have the same pinout.

Using a 100Hz pulse it took approximately 10s to move 1mm, which sits well with the stated 1 micron resolution of these stages.

Misc. Pictures:

5phase

P1000662

P1000661

P1000660

P1000659

P1000658

P1000657

P1000656

P1000655

P1000654

P1000653

P1000652

P1000651

P1000650

P1000690

Axopatch 200A Internal Pics

I picked up an Axon instruments Axopatch 200A on ebay (it’s a patch clamp which can be used for ion channel experiments among other things). Here are some PCB pics for your viewing pleasure. No headstage pictures yet, but I’ll add them at some point [UPDATE: added below].

Late 80s early 90s electronics at its finest!

P1000647

I also took some pics of the headstage, it uses a custom can most likely with a bunch of transistor dies (like their other stages). There’s also a OPA627 opamp in there:

P1000675

P1000642

P1000643

P1000644

P1000645

P1000646