Skip to content

Commit

Permalink
a minor spelling error rectified
Browse files Browse the repository at this point in the history
  • Loading branch information
snikumbh committed Jul 31, 2017
1 parent 0236ea2 commit bf0a50e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions readFastaSequences.m
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function [nSeqs, ommittedIndices, passFasta] = readFastaSequences(txt, segmentSizeInBps, givenNSeqs, outputFolder, debugLevel, debugMsgLocation)
function [nSeqs, omittedIndices, passFasta] = readFastaSequences(txt, segmentSizeInBps, givenNSeqs, outputFolder, debugLevel, debugMsgLocation)

% READFASTASEQUENCES
%
Expand Down Expand Up @@ -46,11 +46,11 @@
fasta.legend = cell(1, givenNSeqs);
fasta.sequence = cell(1, givenNSeqs);
i=0;
ommittedIndices = [];
omittedIndices = [];
fasta.title=[txt,', read: ', date];
% Read Sequences and their FASTA legends
fid=fopen(txt,'r');
ofid=fopen(strcat(outputFolder, '/ommittedFastaIds.txt'), 'a');
ofid=fopen(strcat(outputFolder, '/omittedFastaIds.txt'), 'a');
fprintf(ofid, '----%s---%s----\n\n', fprintf('%s',datetime('now')), txt);
lengths = [];
while i < givenNSeqs % feof(fid)==0
Expand All @@ -64,7 +64,7 @@
if lengths(end) >= segmentSizeInBps
fasta.sequence{i}=[fasta.sequence{i},upper(lineRead)];
else % we omit that sequence
ommittedIndices = [ommittedIndices i];
omittedIndices = [omittedIndices i];
fprintf(ofid, '%d\t%s', i, fasta.legend{i});
fprintf(ofid, '\n');
end
Expand All @@ -81,7 +81,7 @@
passFasta = fasta;

if size(ineligibleLengths, 2) > 0
logMessages(debugMsgLocation, sprintf('%d sequence(s) have been ommitted as they are shorter than the segment-size specified. Check ommittedFastaIds.txt\n', length(ineligibleIndices)), debugLevel);
logMessages(debugMsgLocation, sprintf('%d sequence(s) have been omitted as they are shorter than the segment-size specified. Check omittedFastaIds.txt\n', length(ineligibleIndices)), debugLevel);
% Change to what would be passed, if it is different than 'fasta' above
nSeqs = length(find(lengths >= segmentSizeInBps));
passFasta.sequence = cell(1, nSeqs);
Expand Down

0 comments on commit bf0a50e

Please sign in to comment.