Daniel:Notebook/GenomeMiner/2013-7-16

From ZhangLabWiki
Jump to navigation Jump to search

Back to Calendar

Looked more into bowtie 2 format today. Converted .txt files from Dr. Zhang which gave the raw sequences for the probes into .fa files using a MATLAB script I wrote. Jeff informed me this is also easy on Python or Perl. I plan on learning one of these (probably Perl) in order to do future endeavors, as it will not always necessarily be as easy to copy around files as I did this time.

MATLAB script:


function [] = txt_to_fasta(input,set,outputname)
file=fopen(input);
M=textscan(file,'%s');
nprobe=length(M{1});
outfile=fopen(outputname,'w');
for i=1:nprobe
fprintf(outfile,'>Probe_set%i_%i\n',set,i);
fprintf(outfile,'%s\n',M{1}{i});
end