Open askol-lurie opened 1 year ago
So for sure, this is linked to the csv.Sniffer.has_header
function, which return false
. No idea why.
I checked whether in both cases, the csv
package is able to detect the delimiter, and yes. Both files report ',' as the delimiter ...
Line 60
d = sniffer.sniff(peek)
print(repr(d.delimiter))
So I think I have the solution for the provided exemple !
has_header
return False
because the two lines don't belong to the same type !
In
RH41_B6,1,2
SMS_A3,p1,q2
the 1
and 2
are seen as integer. While the p1
and p2
are seens as string.
To continue on that, and still based on the thread here https://github.com/python/cpython/issues/87791
It's seems that the has_header
function automatically detects the type of a column based on its content (numbers/letters ?)
When two rows have a different column typing pattern, the has_header
return False
sample,fastq_1,fastq_2
101-male-brain,/data/file1_R1.fastq.gz,/data/file1_R2.fastq.gz
12-female-liver,/data/013649718184/file2_R1.fastq.gz,/data/013649718184/file2_R2.fastq.gz
is detected as having no header and crashed whereas
sample,fastq_1,fastq_2
101-male-brain,/data/file1_R1.fastq.gz,/data/file1_R2.fastq.gz
120-male-liver,/data/013649718184/file2_R1.fastq.gz,/data/013649718184/file2_R2.fastq.gz
works ! that's crasy :)
will be fixed in the next version
Just because this 12-female-liver
-> 120-male-liver
in the sample column?
yes. But this will be fixed in the next nf-core template
Description of the bug
I'm starting to use v2.0.0 of the nf-core HiC. I used the previous version but always submitted one sample at a time. This time, I created a samplesheet and am running into an issue where hic doesn't think the file has a header. It does. The
has_header()
function of the cvs module used incheck_samplesheet.py
is overly stringent in how it defines headers and seems like it would fail for must samplesheets, as it does for mine.The following sample sheets will fail and succeed, respectively:
Command used and terminal output
Relevant files
No response
System information
nextflow version 22.10.5.5840 Hardware: Slurm HPC Executor: slurm Container engine:Singularity OS: Redhat Linux 7.9 Version of nf-core/hic 2.0.0