SouthGreenPlatform / arcad-hts

Scripts for the analysis of high-throughput sequencing data from the ARCAD project.
http://www.arcad-project.org/
GNU General Public License v3.0
0 stars 1 forks source link

Make Demultadapt handle zipped file #7

Open gsarah opened 9 years ago

gsarah commented 9 years ago

It would be better for demultadapt to handle zipped fastq file instead of having to dezip them before.

timflutre commented 9 years ago

The current code creates an object of class "Fastq_file" defined in davem_fastq.py. Instead of inheriting from "file", we can make it inherit from "gzip.GzipFile". However, there is a problem when reading the files. I posted a question on SO.

timflutre commented 9 years ago

I accepted the pull request from V. Maillol. However, it only handles ZIP files, not GZIP. But I guess it shouldn't be too hard to fix this now.

timflutre commented 9 years ago

Note that the test doesn't pass anymore:

$ cd ~/src/arcad-hts/tests/demultadapt
$ ./test_demultadapt.sh -d /home/me/src/arcad-hts
START test_demultadapt.sh 2014-12-20 21:30:07
cmd-line: ./test_demultadapt.sh -d /home/me/src/arcad-hts
cwd: /home/me/src/arcad-hts/tests/demultadapt
check presence of input data...
temp dir: /home/me/src/arcad-hts/tests/tmp_test_8595
launch demultadapt paired...
Traceback (most recent call last):
  File "/home/me/src/arcad-hts/sp5_gbs/demultadapt.py", line 496, in <module>
    main()
  File "/home/me/src/arcad-hts/sp5_gbs/demultadapt.py", line 469, in main
    output_file_1.write( "%s" % str( read_1 ) )
  File "/home/me/src/arcad-hts/lib/davem_fastq.py", line 142, in write
    if self.tell() == 0 :
ValueError: I/O operation on closed file
cmp: EOF on returned-indiv_1_1.fastq