nrlab-CRUK / INVAR2

restructures version of invar
5 stars 4 forks source link

Error with layoutfile #1

Closed Robinnibor closed 2 years ago

Robinnibor commented 2 years ago

I am getting the following error while running INVAR2. Seems it is not getting my csv format. However I can't figure out which part is broken. Do you have any idea? Thank you!

N E X T F L O W  ~  version 21.10.6
Launching `nrlab-CRUK/INVAR2` [deadly_morse] - revision: dfa097d2b9 [master]
Set to process files in the HNC study/project.
SAMPLE_ID column is missing from the layout file.
BAM_FILE column is missing from the layout file.
CASE_OR_CONTROL column is missing from the layout file.
PATIENT column is missing from the layout file.
INPUT_INTO_LIBRARY_NG column is missing from the layout file.
SAMPLE_NAME column is missing from the layout file.
SAMPLE_TYPE column is missing from the layout file.
TIMEPOINT column is missing from the layout file.
WARN: ./workdir/layoutfile is empty.
WARN: There are no samples active for HNC.

This is the first line of my layoutfile looks like: STUDY, SAMPLE_ID, BAM_FILE, CASE_OR_CONTROL, PATIENT, INPUT_INTO_LIBRARY_NG, SAMPLE_NAME, SAMPLE_TYPE, TIMEPOINT

First few lines of my nextflow.config are these:


    ERROR_SUPPRESSION_NAME = "none"
    FAMILY_SIZE = 1
    LAYOUT_TABLE = "./workdir/layoutfile"
    TUMOUR_MUTATIONS_CSV = "./workdir/fnCF02_WB_OCT.csv"
    FASTA_REFERENCE = "../../hg38_v0_Homo_sapiens_assembly38.fasta"
    THOUSAND_GENOMES_DATABASE = "somatic-hg38_1000g_pon.hg38.vcf"
    COSMIC_DATABASE = "./workdir/COSMIC_v3.2_DBS_GRCh38.txt"```
rich7409 commented 2 years ago

Hi. Could you attach to this issue the first two lines of your layout file and the complete nextflow.config file please? Ideally, please get those first two lines with head -n 2 rather than copy and paste, because there may be some invisible bytes in a header there that cause problems.

For the first line as written in the issue, do you have those space characters between each column header and the commas? If so, that might be the problem right there.

Thanks.

Robinnibor commented 2 years ago

Thank you @rich7409 rich7409. It works after I deleted the spaces.

rich7409 commented 2 years ago

That's interesting, because yesterday I tried running it with spaces in the header names for the layout file and _readcsv, the function that reads the file, trimmed the headers automatically. Even when I put quotes around them to make sure the spaces were included. In short, I couldn't make it fail the way you have!