Daniel:Notebook/GenomeMiner/2013-7-16: Difference between revisions
Jump to navigation
Jump to search
>Djacobse (Created page with "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 file...") |
>Djacobse No edit summary |
||
Line 5: | Line 5: | ||
MATLAB script: | MATLAB script: | ||
<nowiki> | |||
function [] = txt_to_fasta(input,set,outputname) | function [] = txt_to_fasta(input,set,outputname) | ||
file=fopen(input); | file=fopen(input); | ||
Line 14: | Line 15: | ||
fprintf(outfile,'%s\n',M{1}{i}); | fprintf(outfile,'%s\n',M{1}{i}); | ||
end | end | ||
</nowiki> |
Revision as of 22:50, 16 July 2013
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