Converting txt format to raw format

Questions about GenABEL (aka *ABEL) suite of packages
Forum rules
Please remember not to post any sensitive data on this public forum.
The first few posts of newly registered users will be moderated in order to filter out any spammers.

When get a solution to the problem you posted, please change the topic name (e.g. from "how to ..." to "[SOLVED] how to ..."). This will make it easier for the community to follow the posts yet to be attended.
nasirb
Posts: 1
Joined: Thu Mar 20, 2014 4:27 am

Converting txt format to raw format

Postby nasirb » Thu Mar 20, 2014 4:31 am

Hi
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!??

TIA!
Last edited by lckarssen on Sun Mar 30, 2014 1:34 pm, edited 1 time in total.
Reason: Reformatted code with the [code] tag

lckarssen
Site Admin
Site Admin
Posts: 322
Joined: Tue Jan 04, 2011 3:04 pm
Location: Utrecht, The Netherlands

Re: Converting txt format to raw format

Postby lckarssen » Sun Mar 30, 2014 9:26 am

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}'
-------
Lennart Karssen
PolyOmica
The Netherlands
-------


Return to “GenABEL”

Who is online

Users browsing this forum: No registered users and 2 guests