Skip to content

Commit

Permalink
Scrubbing comments off FastQ read names
Browse files Browse the repository at this point in the history
  • Loading branch information
dzerbino committed Mar 3, 2012
1 parent 5d3b98a commit 7695498
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -431,3 +431,6 @@ V 1.2.03
V 1.2.04
- Crashing bugs linked to empty readsets.
- Realloc bug when a read has more then 20 mappings.

V 1.2.05
- Scrubbing comments out of FastQ read names
16 changes: 8 additions & 8 deletions src/readSet.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,10 @@ static void readFastQFile(SequencesWriter *seqWriteInfo, char *filename, Categor
}
while(fgets(line, maxline, file)) {

for (i = strlen(line) - 1;
i >= 0 && (line[i] == '\n' || line[i] == '\r'); i--) {
line[i] = '\0';
}
// Chomping EOL characters and comments
for (i=strlen(line) - 1; i >= 0; i--)
if (line[i] == '\n' || line[i] == '\r' || line[i] == ' ' || line[i] == '\t')
line[i] = '\0';
if (isCreateBinary()) {
if (counter > 0) {
// end previous seq
Expand Down Expand Up @@ -563,10 +563,10 @@ static void readFastQGZFile(SequencesWriter *seqWriteInfo, char *filename, Categ
inputCnySeqFileStart(cat, seqWriteInfo);
}
while (gzgets(file, line, maxline)) {
for (i = strlen(line) - 1;
i >= 0 && (line[i] == '\n' || line[i] == '\r'); i--) {
line[i] = '\0';
}
// Chomping EOL characters and comments
for (i=strlen(line) - 1; i >= 0; i--)
if (line[i] == '\n' || line[i] == '\r' || line[i] == ' ' || line[i] == '\t')
line[i] = '\0';

if (isCreateBinary()) {
if (counter > 0) {
Expand Down

0 comments on commit 7695498

Please sign in to comment.