aineniamh / snipit

snipit: summarise snps relative to your reference sequence
GNU General Public License v3.0
141 stars 28 forks source link

Error: name not a column name in label.csv #12

Closed rebeelouise closed 2 years ago

rebeelouise commented 2 years ago

Having trouble with renaming the samples in my plot (which has worked many times before!?) with the error

Error: name not a column name in label.csv

Input

snipit aligned.fasta -r MN908947.3 -l label.csv

csv file looks fine?

`(snipit) rebee@server:~/projects/feb2022/filtered/consensus/with-ref$ head label.csv
name,label`
aineniamh commented 2 years ago

Hmmm, thats an odd one. Can you share the file? Sometimes hidden characters can get prepended on the header of a file depending on which software has been used to make it, so it could be that? I'm happy to take a look!

rebeelouise commented 2 years ago

Hi Aine! I thought so too - it's probably something obvious to you - but I am only a dabbler in informatics! label.csv

aineniamh commented 2 years ago

Ah yeah that's exactly what it is- when you look at your file in a terminal the top of it looks like this:

<U+FEFF>name,label
/home/rebee/projects/cyclophosphamide-mice//midnight/filtered/FAR88037_barcode41_filtered/ARTIC/medaka,Coh4 cyclo-Molnupiravir Animal-1 Day-7 Nasal Tissue
/home/rebee/projects/cyclophosphamide-mice//midnight/filtered/FAR88037_barcode42_filtered/ARTIC/medaka,Coh4 cyclo-Molnupiravir Animal-1 Day-7 Lung RNA
/home/rebee/projects/cyclophosphamide-mice//midnight/filtered/FAR88037_barcode43_filtered/ARTIC/medaka,Coh4 cyclo-Molnupiravir Animal-2 Day-7 Nasal Tissue

That's classic excel editing. If you just open your file in a normal text editor, remove the header and put it back in it should work fine!

rebeelouise commented 2 years ago

Ah yeah that's exactly what it is- when you look at your file in a terminal the top of it looks like this:

<U+FEFF>name,label
/home/rebee/projects/cyclophosphamide-mice//midnight/filtered/FAR88037_barcode41_filtered/ARTIC/medaka,Coh4 cyclo-Molnupiravir Animal-1 Day-7 Nasal Tissue
/home/rebee/projects/cyclophosphamide-mice//midnight/filtered/FAR88037_barcode42_filtered/ARTIC/medaka,Coh4 cyclo-Molnupiravir Animal-1 Day-7 Lung RNA
/home/rebee/projects/cyclophosphamide-mice//midnight/filtered/FAR88037_barcode43_filtered/ARTIC/medaka,Coh4 cyclo-Molnupiravir Animal-2 Day-7 Nasal Tissue

That's classic excel editing. If you just open your file in a normal text editor, remove the header and put it back in it should work fine!

Amazing - thanks! Weird how I have got away with that before !!!

aineniamh commented 2 years ago

The ways of excel are a mystery to me! 😆

rebeelouise commented 2 years ago

And we have lift off thankyou :D