Permalink
Browse files

changed code so that 2nd fastq header line is only a "+", ala CASAVA>…

…=1.8
  • Loading branch information...
1 parent e27a16f commit 09febb6f066b9b5d9dd0e1ce29b15b9edd98ab5b @najoshi committed Feb 28, 2012
Showing with 8 additions and 16 deletions.
  1. +3 −0 README.md
  2. +4 −12 src/trim_paired.c
  3. +1 −4 src/trim_single.c
View
@@ -32,6 +32,9 @@ approximation is close. Illumina quality refers to qualities encoded
with the CASAVA pipeline between versions 1.3 and 1.7. Illumina quality
using CASAVA >= 1.8 is Sanger encoded.
+Note that Sickle will remove the 2nd fastq record header (on the "+" line) and replace it
+with simply a "+". This is the default format for CASAVA >= 1.8.
+
Sickle also supports gzipped file inputs. There is also a sickle.xml file
included in the package that can be used to add sickle to your local [Galaxy](http://galaxy.psu.edu/) server.
View
@@ -247,9 +247,7 @@ int paired_main (int argc, char *argv[]) {
else fprintf (outfile1, "\n");
fprintf (outfile1, "%.*s\n", p1cut->three_prime_cut - p1cut->five_prime_cut, fqrec1->seq.s + p1cut->five_prime_cut);
- fprintf (outfile1, "+%s", fqrec1->name.s);
- if (fqrec1->comment.l) fprintf (outfile1, " %s\n", fqrec1->comment.s);
- else fprintf (outfile1, "\n");
+ fprintf (outfile1, "+\n");
fprintf (outfile1, "%.*s\n", p1cut->three_prime_cut - p1cut->five_prime_cut, fqrec1->qual.s + p1cut->five_prime_cut);
@@ -258,9 +256,7 @@ int paired_main (int argc, char *argv[]) {
else fprintf (outfile2, "\n");
fprintf (outfile2, "%.*s\n", p2cut->three_prime_cut - p2cut->five_prime_cut, fqrec2->seq.s + p2cut->five_prime_cut);
- fprintf (outfile2, "+%s", fqrec2->name.s);
- if (fqrec2->comment.l) fprintf (outfile2, " %s\n", fqrec2->comment.s);
- else fprintf (outfile2, "\n");
+ fprintf (outfile2, "+\n");
fprintf (outfile2, "%.*s\n", p2cut->three_prime_cut - p2cut->five_prime_cut, fqrec2->qual.s + p2cut->five_prime_cut);
kept_p += 2;
@@ -273,9 +269,7 @@ int paired_main (int argc, char *argv[]) {
else fprintf (single, "\n");
fprintf (single, "%.*s\n", p1cut->three_prime_cut - p1cut->five_prime_cut, fqrec1->seq.s + p1cut->five_prime_cut);
- fprintf (single, "+%s", fqrec1->name.s);
- if (fqrec1->comment.l) fprintf (single, " %s\n", fqrec1->comment.s);
- else fprintf (single, "\n");
+ fprintf (single, "+\n");
fprintf (single, "%.*s\n", p1cut->three_prime_cut - p1cut->five_prime_cut, fqrec1->qual.s + p1cut->five_prime_cut);
kept_s1++;
@@ -288,9 +282,7 @@ int paired_main (int argc, char *argv[]) {
else fprintf (single, "\n");
fprintf (single, "%.*s\n", p2cut->three_prime_cut - p2cut->five_prime_cut, fqrec2->seq.s + p2cut->five_prime_cut);
- fprintf (single, "+%s", fqrec2->name.s);
- if (fqrec2->comment.l) fprintf (single, " %s\n", fqrec2->comment.s);
- else fprintf (single, "\n");
+ fprintf (single, "+\n");
fprintf (single, "%.*s\n", p2cut->three_prime_cut - p2cut->five_prime_cut, fqrec2->qual.s + p2cut->five_prime_cut);
kept_s2++;
View
@@ -182,10 +182,7 @@ int single_main (int argc, char *argv[]) {
/* by subtracting the 5' cut because the 3' cut was calculated on the original sequence */
fprintf (outfile, "%.*s\n", p1cut->three_prime_cut - p1cut->five_prime_cut, fqrec->seq.s + p1cut->five_prime_cut);
- fprintf (outfile, "+%s", fqrec->name.s);
- if (fqrec->comment.l) fprintf (outfile, " %s\n", fqrec->comment.s);
- else fprintf (outfile, "\n");
-
+ fprintf (outfile, "+\n");
fprintf (outfile, "%.*s\n", p1cut->three_prime_cut - p1cut->five_prime_cut, fqrec->qual.s + p1cut->five_prime_cut);
kept++;

0 comments on commit 09febb6

Please sign in to comment.