Codebase list fastqc / 8a90a6c
Fix line endings in patch Andreas Tille 7 years ago
1 changed file(s) with 103 addition(s) and 107 deletion(s). Raw diff Collapse all Expand all
1212 poretools, I propose to temporarily drop fast5 support from FastQC
1313 to avoid a removal from testing.
1414
15 --- fastqc.orig/fastqc
16 +++ fastqc/fastqc
15 --- a/fastqc
16 +++ b/fastqc
1717 @@ -74,7 +74,6 @@ my $quiet;
1818 my $nogroup;
1919 my $expgroup;
5353 --nofilter If running with --casava then don't remove read flagged by
5454 casava as poor quality when performing the QC analysis.
5555
56 Index: fastqc/uk/ac/babraham/FastQC/Sequence/SequenceFactory.java
57 ===================================================================
58 --- fastqc.orig/uk/ac/babraham/FastQC/Sequence/SequenceFactory.java
59 +++ fastqc/uk/ac/babraham/FastQC/Sequence/SequenceFactory.java
56 --- a/uk/ac/babraham/FastQC/Sequence/SequenceFactory.java
57 +++ b/uk/ac/babraham/FastQC/Sequence/SequenceFactory.java
6058 @@ -99,9 +99,6 @@ public class SequenceFactory {
61 // We default to using all reads
62 return new BAMFile(file,false);
63 }
64 - else if (file.getName().toLowerCase().endsWith(".fast5")) {
65 - return new Fast5File(file);
66 - }
67 else {
68 return new FastQFile(config,file);
69 }
70 Index: fastqc/uk/ac/babraham/FastQC/Sequence/Fast5File.java
71 ===================================================================
72 --- fastqc.orig/uk/ac/babraham/FastQC/Sequence/Fast5File.java
59 // We default to using all reads
60 return new BAMFile(file,false);
61 }
62 - else if (file.getName().toLowerCase().endsWith(".fast5")) {
63 - return new Fast5File(file);
64 - }
65 else {
66 return new FastQFile(config,file);
67 }
68 --- a/uk/ac/babraham/FastQC/Sequence/Fast5File.java
7369 +++ /dev/null
7470 @@ -1,89 +0,0 @@
75 -/**
76 - * Copyright Copyright 2010-15 Simon Andrews
77 - *
78 - * This file is part of FastQC.
79 - *
80 - * FastQC is free software; you can redistribute it and/or modify
81 - * it under the terms of the GNU General Public License as published by
82 - * the Free Software Foundation; either version 3 of the License, or
83 - * (at your option) any later version.
84 - *
85 - * FastQC is distributed in the hope that it will be useful,
86 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
87 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
88 - * GNU General Public License for more details.
89 - *
90 - * You should have received a copy of the GNU General Public License
91 - * along with FastQC; if not, write to the Free Software
92 - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
93 - */
94 -package uk.ac.babraham.FastQC.Sequence;
95 -
96 -import java.io.File;
97 -import java.io.IOException;
98 -
99 -import ch.systemsx.cisd.hdf5.HDF5Factory;
100 -import ch.systemsx.cisd.hdf5.IHDF5SimpleReader;
101 -
102 -public class Fast5File implements SequenceFile {
103 -
104 - private Sequence nextSequence = null;
105 - private File file;
106 -
107 - private String name;
108 -
109 - protected Fast5File(File file) throws SequenceFormatException, IOException {
110 - this.file = file;
111 - name = file.getName();
112 -
113 - IHDF5SimpleReader reader = HDF5Factory.openForReading(file);
114 -
115 - if (reader.exists("Analyses/Basecall_2D_000/BaseCalled_template/Fastq")) {
116 -
117 - String fastq = reader.readString("Analyses/Basecall_2D_000/BaseCalled_template/Fastq");
118 -
119 - String [] sections = fastq.split("\\n");
120 -
121 - if (sections.length != 4) {
122 - throw new SequenceFormatException("Didn't get 4 sections from "+fastq);
123 - }
124 -
125 - nextSequence = new Sequence(this, sections[1].toUpperCase(),sections[3], sections[0]);
126 - }
127 - reader.close();
128 -
129 - }
130 -
131 - public String name() {
132 - return name;
133 - }
134 -
135 - public int getPercentComplete() {
136 - if (! hasNext()) return 100;
137 -
138 - return 0;
139 - }
140 -
141 - public boolean isColorspace() {
142 - return false;
143 - }
144 -
145 - public boolean hasNext() {
146 - return nextSequence != null;
147 - }
148 -
149 - public Sequence next() throws SequenceFormatException {
150 - Sequence seq = nextSequence;
151 - nextSequence = null;
152 - return seq;
153 - }
154 -
155 - public void remove() {
156 - // No action here
157 - }
158 -
159 - public File getFile() {
160 - return file;
161 - }
162 -
163 -}
71 -/**
72 - * Copyright Copyright 2010-15 Simon Andrews
73 - *
74 - * This file is part of FastQC.
75 - *
76 - * FastQC is free software; you can redistribute it and/or modify
77 - * it under the terms of the GNU General Public License as published by
78 - * the Free Software Foundation; either version 3 of the License, or
79 - * (at your option) any later version.
80 - *
81 - * FastQC is distributed in the hope that it will be useful,
82 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
83 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
84 - * GNU General Public License for more details.
85 - *
86 - * You should have received a copy of the GNU General Public License
87 - * along with FastQC; if not, write to the Free Software
88 - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
89 - */
90 -package uk.ac.babraham.FastQC.Sequence;
91 -
92 -import java.io.File;
93 -import java.io.IOException;
94 -
95 -import ch.systemsx.cisd.hdf5.HDF5Factory;
96 -import ch.systemsx.cisd.hdf5.IHDF5SimpleReader;
97 -
98 -public class Fast5File implements SequenceFile {
99 -
100 - private Sequence nextSequence = null;
101 - private File file;
102 -
103 - private String name;
104 -
105 - protected Fast5File(File file) throws SequenceFormatException, IOException {
106 - this.file = file;
107 - name = file.getName();
108 -
109 - IHDF5SimpleReader reader = HDF5Factory.openForReading(file);
110 -
111 - if (reader.exists("Analyses/Basecall_2D_000/BaseCalled_template/Fastq")) {
112 -
113 - String fastq = reader.readString("Analyses/Basecall_2D_000/BaseCalled_template/Fastq");
114 -
115 - String [] sections = fastq.split("\\n");
116 -
117 - if (sections.length != 4) {
118 - throw new SequenceFormatException("Didn't get 4 sections from "+fastq);
119 - }
120 -
121 - nextSequence = new Sequence(this, sections[1].toUpperCase(),sections[3], sections[0]);
122 - }
123 - reader.close();
124 -
125 - }
126 -
127 - public String name() {
128 - return name;
129 - }
130 -
131 - public int getPercentComplete() {
132 - if (! hasNext()) return 100;
133 -
134 - return 0;
135 - }
136 -
137 - public boolean isColorspace() {
138 - return false;
139 - }
140 -
141 - public boolean hasNext() {
142 - return nextSequence != null;
143 - }
144 -
145 - public Sequence next() throws SequenceFormatException {
146 - Sequence seq = nextSequence;
147 - nextSequence = null;
148 - return seq;
149 - }
150 -
151 - public void remove() {
152 - // No action here
153 - }
154 -
155 - public File getFile() {
156 - return file;
157 - }
158 -
159 -}