Page 1 of 1

Converting txt format to raw format

Posted: Thu Mar 20, 2014 4:31 am
by nasirb
I am a new user of R and GenAbel, and learning things as I go along and try to do my data analysis. Please dont mind my lack of knowledge!

I have a genotype txt file, with IDs in col1, and then snp data in subsequent columns.

I am trying to create a file for use in GenAbel.

I am using

Code: Select all

convert.snp.text ("inputfile","outputfile")
Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
  scan() expected 'a real', got 'X1022'

So Im assuming that it doesnt like the use of numerals and characters used collectively.
How do I get this code working so that it likes the data in the file!??


Re: Converting txt format to raw format

Posted: Sun Mar 30, 2014 9:26 am
by lckarssen
Could you post the first few lines of your inputfile? If it contains many columns, than posting only a few of those will be ok.
You can do that for example by running the following on the command line of your Linux shell:

Code: Select all

head inputfile | gawk '{print $1, $2, $3, $4, $5, $6, $7, $8, $9, $10}'