loading dataset

Skip to first unread message

Ian Bremen

Aug 18, 2021, 1:21:38 PMAug 18
to R/qtl discussion
Dear Karl, 
Please look at the error and suggest the solution
I tried to load the dataset as below.

> mapc <- read.cross("csv", file = "C:/Users/39351/Documents/newsetC.csv", estimate.map = FALSE)
 --Read the following data:
137  individuals
4676  markers
1  phenotypes
 --Cross type: bc
Warning messages:
1: In read.cross.csv(dir, file, na.strings, genotypes, estimate.map,  :
  The following unexpected genotype codes were treated as missing.

2: In read.cross.csv(dir, file, na.strings, genotypes, estimate.map,  :
  There is no genotype data!

3: In summary.cross(cross) : Strange genotype pattern on chr 1.
4: In summary.cross(cross) :
  Some chromosomes > 1000 cM in length; there may be a problem with the genetic map.
  (Perhaps it is in basepairs?)
> summary(newsetC)
Error in summary(newsetC) : object 'newsetC' not found

Karl Broman

Aug 18, 2021, 10:12:16 PMAug 18
to R/qtl discussion
The warning message about unexpected genotype codes indicates that your dated is coded as 1 and 2, with missing values as "--", so in the call to read.cross you want to include
genotypes=c("1", "2"), na.strings="--"

The warning message "Some chromosomes > 1000 cM in length" is saying that the marker positions seem to be in basepairs, but we need cM. Dividing by 1,000,000, and providing Mbp, would probably be better.

Note that both are warnings, and that the object "mapc" was created. The error "newsetC not found" is because in your call to summary() you used a different object name.


Ian Bremen

Aug 19, 2021, 7:46:07 AMAug 19
to R/qtl discussion
Thanks a lot. 

Ian Bremen

Aug 19, 2021, 9:01:57 AMAug 19
to R/qtl discussion
and now i configure this problem, no idea how to proceed and what to write instead of 200

> plot(ntyped(mapc, "mar"), ylab="No. typed individuals", main="No. genotypes by marker")

> mapc <- subset(mapc, ind=(ntyped(mapthis)>5))

Error in ntyped(mapthis) : object 'mapthis' not found

> mapc <- subset(mapc, ind=(ntyped(mapc)>5))

> nt.bymar <- ntyped(mapc, "mar")

> View(mapc)

> todrop <- names(nt.bymar[nt.bymar < 200])

> mapc <- drop.markers(mapc, todrop)

Error in drop.markers(mapc, todrop) :

  You're attempting to drop *all* of the markers, which isn't allowed.

On Thursday, August 19, 2021 at 4:12:16 AM UTC+2 Karl Broman wrote:
Reply all
Reply to author
0 new messages