User Tools

Site Tools


project:biolab:pcr

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

project:biolab:pcr [2025/06/15 07:53] – created sachyproject:biolab:pcr [2025/06/15 08:06] (current) sachy
Line 5: Line 5:
 Since 2025, we have restarted our legendary efforts to have reproducible PCR results. Running workflow includes flowbox, sterile equipment, new centrifuges and thermocyclers... and of course university-grade knowledge. Since 2025, we have restarted our legendary efforts to have reproducible PCR results. Running workflow includes flowbox, sterile equipment, new centrifuges and thermocyclers... and of course university-grade knowledge.
  
-TODO Vic textu+==== Bio-Rad iCycler image conventer ==== 
 + 
 +The iCycler software is storing images of 96-wells fluorescence activities in their own binary blob .ISI without the possibility to export to any standard format like TIFF or DICOM. So one have to hexdump and write their own conventer... 
 + 
 +<code c isi2tiff.c> 
 +// Convert BIO-RAD ISI to TIFF 
 +// 16bit grayscale little-endian 
 +// CC-BY-NC sachy@brmlab 
 + 
 +#include <stdio.h> 
 +#include <stdlib.h> 
 +#include <string.h> 
 +#define ISIWIDTH 342 
 +#define TIFFWIDTH 310 
 +#define TIFFHEIGHT 240 
 +#define TIFFHEAD {0x49,0x49,0x2a,0x00,0x88,0x8a,0x04,0x00} 
 + 
 +unsigned char tt[]={0x11,0x00,0x00,0x01,0x03,0x00,0x01,0x00, 
 +0x00,0x00,0x36,0x01,0x00,0x00,0x01,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0xf0,0x00, 
 +0x00,0x00,0x02,0x01,0x03,0x00,0x02,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x03,0x01, 
 +0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x01,0x03,0x00,0x01,0x00, 
 +0x00,0x00,0x01,0x00,0x00,0x00,0x11,0x01,0x04,0x00,0x02,0x00,0x00,0x00,0x72,0x8b, 
 +0x04,0x00,0x12,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x15,0x01, 
 +0x03,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x16,0x01,0x03,0x00,0x01,0x00, 
 +0x00,0x00,0x80,0x00,0x00,0x00,0x17,0x01,0x04,0x00,0x02,0x00,0x00,0x00,0x6a,0x8b, 
 +0x04,0x00,0x1a,0x01,0x05,0x00,0x01,0x00,0x00,0x00,0x5a,0x8b,0x04,0x00,0x1b,0x01, 
 +0x05,0x00,0x01,0x00,0x00,0x00,0x62,0x8b,0x04,0x00,0x1c,0x01,0x03,0x00,0x01,0x00, 
 +0x00,0x00,0x01,0x00,0x00,0x00,0x1d,0x01,0x02,0x00,0x02,0x00,0x00,0x00,0x2d,0x00, 
 +0x00,0x00,0x28,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x52,0x01, 
 +0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x53,0x01,0x03,0x00,0x02,0x00, 
 +0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00, 
 +0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x6c,0x02,0x00,0x80,0x1e, 
 +0x02,0x00,0x08,0x00,0x00,0x00,0x08,0x6c,0x02,0x00}; 
 + 
 +int main(int argc,char **argv) 
 +
 + FILE *in=NULL; 
 + FILE *out=NULL; 
 + switch(argc) 
 +
 + case 2: 
 +
 + in=fopen(argv[1],"r"); 
 + out=stdout; 
 + break; 
 +
 + case 3: 
 +
 + in=fopen(argv[1],"r"); 
 + out=fopen(argv[2],"w"); 
 + break; 
 +
 + default: 
 + case 0: 
 + case 1: 
 +
 + printf("isi2tif infile [outfile]"); 
 + return -1; 
 + break; 
 +
 +
 + 
 + unsigned char buff[ISIWIDTH*2]; 
 + unsigned char buff2[ISIWIDTH*2*2]; 
 + unsigned char th[]=TIFFHEAD; 
 + unsigned short h=0; 
 + memset(buff,0x00,ISIWIDTH*2); 
 + fread(buff,1,38*2,in); 
 + 
 + fwrite(th,1,sizeof(th),out); 
 + while(fread(buff,2,ISIWIDTH,in)==ISIWIDTH && h++<TIFFHEIGHT) 
 +
 + memset(buff2,0xFF,sizeof(buff2)); 
 + for(int i=0;i<sizeof(buff)/2;i++) 
 + memcpy(buff2+i*4,buff+i*2,2); 
 + 
 + fwrite(buff2,2*2,TIFFWIDTH,out); 
 +
 + fwrite(tt,1,sizeof(tt),out); 
 + 
 + fclose(in); 
 + fclose(out); 
 + return 0; 
 +
 +</code> 
 + 
 + 
 +FIXME TODO Vic textu
  
  
project/biolab/pcr.txt · Last modified: 2025/06/15 08:06 by sachy