Single marker analysis with R/qtl

641 views
Skip to first unread message

Ramesh Bhat

unread,
Mar 29, 2019, 7:27:39 AM3/29/19
to R/qtl discussion
Hi,

Can we do single marker analysis with R/qtl?

Please suggest the functions and scripts.

Kind regards,

Karl Broman

unread,
Mar 29, 2019, 7:34:40 AM3/29/19
to rqtl...@googlegroups.com
It is not recommended, but you can use scanone() with method="mr" for
"marker regression".
Best to use method="em" or method="hk".

karl

Ramesh Bhat

unread,
Mar 29, 2019, 8:08:07 AM3/29/19
to R/qtl discussion

Are the codes and sample data file available for single marker analysis?

Karl Broman

unread,
Mar 29, 2019, 8:13:47 AM3/29/19
to rqtl...@googlegroups.com
The data file would be the same; sample data files at http://rqtl.org/sampledata

Marker discussion is discussed at the beginning of chapter 4 of the R/qtl book, http://rqtl.org/book/

It’s not discussed in the tutorials (http://rqtl.org/tutorials), because I strongly recommend against it.

karl
--
You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
To post to this group, send email to rqtl...@googlegroups.com.
Visit this group at https://groups.google.com/group/rqtl-disc.
For more options, visit https://groups.google.com/d/optout.

Ramesh Bhat

unread,
Mar 29, 2019, 8:53:28 AM3/29/19
to R/qtl discussion
Where can I get hyper.csv file?

Karl Broman

unread,
Mar 29, 2019, 9:32:33 AM3/29/19
to rqtl...@googlegroups.com
The hyper data are included with R/qtl, in its internal format:

  library(qtl)
  data(hyper)
  ls()

We don't have a CSV file available, but you could write it to a file
with write.cross():

  write.cross(hyper, "csv", "hyper")

this will create a file "hyper.csv" in your R working directory.

karl
> --
> You received this message because you are subscribed to the Google
> Groups "R/qtl discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to rqtl-disc+...@googlegroups.com
> <mailto:rqtl-disc+...@googlegroups.com>.
> To post to this group, send email to rqtl...@googlegroups.com
> <mailto:rqtl...@googlegroups.com>.

Ramesh Bhat

unread,
Mar 29, 2019, 9:48:28 AM3/29/19
to R/qtl discussion
Thanks.

You are simply great.

kind regards,


On Friday, March 29, 2019 at 4:57:39 PM UTC+5:30, Ramesh Bhat wrote:

Ramesh Bhat

unread,
Mar 29, 2019, 11:36:44 AM3/29/19
to rqtl...@googlegroups.com
How about single marker analysis for many traits? Should we do it separately or can we do it with reiteration?

May I know the codes?

Karl Broman

unread,
Mar 29, 2019, 11:41:51 AM3/29/19
to rqtl...@googlegroups.com
You can analyze them individually or together. See page 5 of http://rqtl.org/tutorials/rqtltour2.pdf

karl

Ramesh Bhat

unread,
Mar 29, 2019, 11:53:13 AM3/29/19
to rqtl...@googlegroups.com
Thanks. If I have the trait values in col 2 to 10, can I club them like phono.col2:10?

  1. out.hr <- scanone(sug, pheno.col=2:10, method="hk)
    


Ramesh Bhat

unread,
Apr 3, 2019, 10:08:25 AM4/3/19
to rqtl...@googlegroups.com
D
SMA.csv

Karl Broman

unread,
Apr 3, 2019, 11:22:28 AM4/3/19
to rqtl...@googlegroups.com
R/qtl is not the appropriate software for such data.

karl

On Apr 3, 2019, at 4:08 PM, Ramesh Bhat <bhatra...@gmail.com> wrote:

Dear Dr. Karl,

Here is a sample file with two traits (trait1 and trait2) and three markers (marker1, marker2 and marker3).

Can you please provide me the codes for single marker analysis (trait1~marker1, trait1~marker2, trait1~marker3, trait2~marker1, trait2~marker2 and trait2~marker3)?

Kind regards,

Ramesh Bhat

unread,
Apr 5, 2019, 10:12:51 PM4/5/19
to rqtl...@googlegroups.com
With respect to the sample data file “sug.csv”, should we mention CC, BB or CB? or can we give it as C, B or H?

Karl Broman

unread,
Apr 6, 2019, 8:57:47 AM4/6/19
to rqtl...@googlegroups.com
You can use any encoding provided that you are consistent across all markers. You indicate your genotype codes with the ‘genotype’ argument in read.cross().

karl

Ramesh Bhat

unread,
Apr 7, 2019, 9:38:49 AM4/7/19
to rqtl...@googlegroups.com
How does scanone function varies from single marker analysis?

Ramesh Bhat

unread,
Apr 7, 2019, 9:41:47 AM4/7/19
to rqtl...@googlegroups.com
How does scanone function vary/differ from single marker analysis?

Karl Broman

unread,
Apr 8, 2019, 9:14:05 AM4/8/19
to rqtl...@googlegroups.com
scanone performs a genome scan with a single-QTL model, considering each
location in the genome, one at a time, as the possible QTL.
The genome scan can be performed by multiple methods.

In "single marker analysis", one would consider each marker one at a
time, but would have to omit any individuals that have missing genotype
at the marker.

An improvement on that is interval mapping (Lander and Botstein 1989),
which uses information at surrounding markers to essentially infer
genotype for the individuals with missing marker genotype. This method
also allows you to interrogate positions between markers.

For more details, see Chapter 4 of the R/qtl book
(http://rqtl.org/book), or this review:

https://www.biostat.wisc.edu/~kbroman/publications/labanimal.pdf

karl

On 4/7/19 8:38 AM, Ramesh Bhat wrote:
> How does scanone function varies from single marker analysis?
>
>
>
>> On 06-04-2019, at 6:27 PM, Karl Broman <kbr...@gmail.com
>> <mailto:kbr...@gmail.com>> wrote:
>>
>> You can use any encoding provided that you are consistent across all
>> markers. You indicate your genotype codes with the ‘genotype’
>> argument in read.cross().
>>
>> karl
>>
>> On Apr 5, 2019, at 9:12 PM, Ramesh Bhat <bhatra...@gmail.com
>> <mailto:bhatra...@gmail.com>> wrote:
>>
>>> With respect to the sample data file “sug.csv”, should we mention
>>> CC, BB or CB? or can we give it as C, B or H?
>>>
>>>
>>>
>>>> On 03-04-2019, at 8:52 PM, Karl Broman <kbr...@gmail.com
>>>> <mailto:kbr...@gmail.com>> wrote:
>>>>
>>>> R/qtl is not the appropriate software for such data.
>>>>
>>>> karl
>>>>
>>>> On Apr 3, 2019, at 4:08 PM, Ramesh Bhat <bhatra...@gmail.com
>>>> <mailto:bhatra...@gmail.com>> wrote:
>>>>
>>>>> Dear Dr. Karl,
>>>>>
>>>>> Here is a sample file with two traits (trait1 and trait2) and
>>>>> three markers (marker1, marker2 and marker3).
>>>>>
>>>>> Can you please provide me the codes for single marker analysis
>>>>> (trait1~marker1, trait1~marker2, trait1~marker3, trait2~marker1,
>>>>> trait2~marker2 and trait2~marker3)?
>>>>>
>>>>> Kind regards,
>>>>>
>>>>>> On 29-Mar-2019, at 9:11 PM, Karl Broman <kbr...@gmail.com
>>>>>> <mailto:kbr...@gmail.com>> wrote:
>>>>>>
>>>>>> You can analyze them individually or together. See page 5 of
>>>>>> http://rqtl.org/tutorials/rqtltour2.pdf
>>>>>>
>>>>>> karl
>>>>>>
>>>>>> On Mar 29, 2019, at 10:36 AM, Ramesh Bhat <bhatra...@gmail.com
>>>>>> <mailto:bhatra...@gmail.com>> wrote:
>>>>>>
>>>>>>> How about single marker analysis for many traits? Should we do
>>>>>>> it separately or can we do it with reiteration?
>>>>>>>
>>>>>>> May I know the codes?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> On 29-Mar-2019, at 5:43 PM, Karl Broman <kbr...@gmail.com
>>>>>>>> <mailto:kbr...@gmail.com>> wrote:
>>>>>>>>
>>>>>>>> The data file would be the same; sample data files at
>>>>>>>> http://rqtl.org/sampledata
>>>>>>>>
>>>>>>>> Marker discussion is discussed at the beginning of chapter 4 of
>>>>>>>> the R/qtl book, http://rqtl.org/book/
>>>>>>>>
>>>>>>>> It’s not discussed in the tutorials
>>>>>>>> (http://rqtl.org/tutorials), because I strongly recommend
>>>>>>>> against it.
>>>>>>>>
>>>>>>>> karl
>>>>>>>>
>>>>>>>> On Mar 29, 2019, at 7:08 AM, Ramesh Bhat
>>>>>>>> <bhatra...@gmail.com <mailto:bhatra...@gmail.com>> wrote:
>>>>>>>>
>>>>>>>>> On Friday, March 29, 2019 at 5:04:40 PM UTC+5:30, Karl Broman
>>>>>>>>> wrote:
>>>>>>>>>> It is not recommended, but you can use scanone() with
>>>>>>>>>> method="mr" for
>>>>>>>>>> "marker regression".
>>>>>>>>>> Best to use method="em" or method="hk".
>>>>>>>>>>
>>>>>>>>>> karl
>>>>>>>>>>
>>>>>>>>>> On 3/29/19 6:27 AM, Ramesh Bhat wrote:
>>>>>>>>>>> Hi,
>>>>>>>>>>>
>>>>>>>>>>> Can we do single marker analysis with R/qtl?
>>>>>>>>>>>
>>>>>>>>>>> Please suggest the functions and scripts.
>>>>>>>>>>>
>>>>>>>>>>> Kind regards,
>>>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Are the codes and sample data file available for single marker
>>>>>>>>> analysis?
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> You received this message because you are subscribed to the
>>>>>>>>> Google Groups "R/qtl discussion" group.
>>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>>> it, send an email to rqtl-disc+...@googlegroups.com
>>>>>>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>>>>>>> To post to this group, send email to
>>>>>>>>> rqtl...@googlegroups.com <mailto:rqtl...@googlegroups.com>.
>>>>>>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>
>>>>>>>> --
>>>>>>>> You received this message because you are subscribed to the
>>>>>>>> Google Groups "R/qtl discussion" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>>> it, send an email to rqtl-disc+...@googlegroups.com
>>>>>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>>>>>> To post to this group, send email to rqtl...@googlegroups.com
>>>>>>>> <mailto:rqtl...@googlegroups.com>.
>>>>>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the
>>>>>>> Google Groups "R/qtl discussion" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>>> it, send an email to rqtl-disc+...@googlegroups.com
>>>>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>>>>> To post to this group, send email to rqtl...@googlegroups.com
>>>>>>> <mailto:rqtl...@googlegroups.com>.
>>>>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>> --
>>>>>> You received this message because you are subscribed to the
>>>>>> Google Groups "R/qtl discussion" group.
>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>> send an email to rqtl-disc+...@googlegroups.com
>>>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>>>> To post to this group, send email to rqtl...@googlegroups.com
>>>>>> <mailto:rqtl...@googlegroups.com>.
>>>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "R/qtl discussion" group.
>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>> send an email to rqtl-disc+...@googlegroups.com
>>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>>> To post to this group, send email to rqtl...@googlegroups.com
>>>>> <mailto:rqtl...@googlegroups.com>.
>>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "R/qtl discussion" group.
>>>> To unsubscribe from this group and stop receiving emails from it,
>>>> send an email to rqtl-disc+...@googlegroups.com
>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>> To post to this group, send email to rqtl...@googlegroups.com
>>>> <mailto:rqtl...@googlegroups.com>.
>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "R/qtl discussion" group.
>>> To unsubscribe from this group and stop receiving emails from it,
>>> send an email to rqtl-disc+...@googlegroups.com
>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>> To post to this group, send email to rqtl...@googlegroups.com
>>> <mailto:rqtl...@googlegroups.com>.
>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "R/qtl discussion" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to rqtl-disc+...@googlegroups.com
>> <mailto:rqtl-disc+...@googlegroups.com>.
>> To post to this group, send email to rqtl...@googlegroups.com
>> <mailto:rqtl...@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/rqtl-disc.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "R/qtl discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to rqtl-disc+...@googlegroups.com
> <mailto:rqtl-disc+...@googlegroups.com>.
> To post to this group, send email to rqtl...@googlegroups.com
> <mailto:rqtl...@googlegroups.com>.

Ramesh Bhat

unread,
Apr 10, 2019, 11:11:13 AM4/10/19
to rqtl...@googlegroups.com

Dear Dr. Broman,

Can I expect an improvement in R/qtl for

1. Better quality of the figure for genetic map

2. Exporting the map order of the markers on the chromosome to a csv or txt file.

Bhat


To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
To post to this group, send email to rqtl...@googlegroups.com.

Karl Broman

unread,
Apr 10, 2019, 11:29:34 AM4/10/19
to R/qtl discussion


On Wednesday, April 10, 2019 at 10:11:13 AM UTC-5, Ramesh Bhat wrote:
Can I expect an improvement in R/qtl for

1. Better quality of the figure for genetic map


No, I'm not planning to put any more effort into plotting genetic maps.
 

2. Exporting the map order of the markers on the chromosome to a csv or txt file.



You can currently use pull.map() and map2table() to get the genetic map as a data frame. You can then use write.csv() to write it to a csv file.

karl

Ramesh Bhat

unread,
Apr 10, 2019, 11:39:11 AM4/10/19
to rqtl...@googlegroups.com
Thanks.

Sorry to know that you are not planning to improve the map. Any other clear alternative method do you suggest?

Can you please provide me some more details on the use of pull.map() and map2table() to get the genetic map as a data frame?

Is the write.csv() for pull.map and map2table?

Regards,

Ramesh Bhat

unread,
Apr 10, 2019, 11:43:37 AM4/10/19
to rqtl...@googlegroups.com
I purchased your book on R/qtl today.

Regards,


Ramesh Bhat

unread,
Apr 10, 2019, 12:01:11 PM4/10/19
to rqtl...@googlegroups.com
Thanks.

Sorry to know that you are not planning to improve the map. Any other clear alternative method do y

Can you please provide me some more details on the use of pull.map() and map2table() to get the genetic map as a data frame?

Is the write.csv() for pull.map and map2table?

Regards,

Karl Broman

unread,
Apr 10, 2019, 12:23:51 PM4/10/19
to rqtl...@googlegroups.com


On 4/10/19 10:39 AM, Ramesh Bhat wrote:
>
> Sorry to know that you are not planning to improve the map. Any other
> clear alternative method do you suggest?
>

Maybe look at LinkageMapView,
https://cran.r-project.org/package=LinkageMapView

> Can you please provide me some more details on the use of pull.map()
> and map2table() to get the genetic map as a data frame?

    data(hyper)
    map <- pull.map(hyper)
    map_as_table <- map2table(map)


>
> Is the write.csv() for pull.map and map2table?
>
>

write.csv() is a base R function for writing an object to a CSV file.

    write.csv(map_as_table, "map.csv")

write.table() is a bit more flexible.

    write.table(map_as_table, "map.csv", row.names=TRUE,
col.names=TRUE, sep=",", quote=FALSE)

karl

Ramesh Bhat

unread,
Apr 11, 2019, 2:39:19 AM4/11/19
to rqtl...@googlegroups.com
Hi Karl,

Please find the attached file with the scripts for genetic map construction.

There are multiple scripts with pull.map() even for the same chromosome (for example; two for chr 5, four for chr 4 etc). Which one should I consider for the following function

data(mapthis)
map <- pull.map(mapthis, chr=5)
map_as_table <- map2table(map)

write.csv(map_as_table, "map.csv")


 Regards,



--
You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
To post to this group, send email to rqtl...@googlegroups.com.
Visit this group at https://groups.google.com/group/rqtl-disc.
For more options, visit https://groups.google.com/d/optout.


--
Ramesh S. Bhat
Professor and Head
Department of Biotechnology
University of Agricultural Sciences, Dharwad
PIN: 580 005, Dharwad, Karnataka, India
Ph: +91-836-2214457, Mobile: +91-9945667300
Map construction.docx

Ramesh Bhat

unread,
Apr 11, 2019, 5:17:37 AM4/11/19
to rqtl...@googlegroups.com
Dear Karl,
I have the following questions.
1. Does "summary(rip5lik)” show only the best order?
                                        LOD chrlen
Initial  1 2 3 4 5 6 7 8 9     0.0   38.2
1        1 2 3 4 5 6 7 9 8     0.1   38.4 
2. How to get the list of unmapped markers?
3. If window is equal to the number of markers on the chromosome, how to indicate in the following script 
rip5 <- ripple(mapthis, chr=5, window=7)
4. Reduced assumed genotyping error rate lead to increased map length: Is it always so, why?
5. Can I see all the orders in
summary(rip5)
                                      obligXO
Initial  1 2 3 4 5 6 7 8 9     215
1        1 2 3 4 5 6 7 9 8     216
2        1 2 3 4 6 5 7 8 9     217

6. Can I see a particular order (say order number 101), and is the order 1 the best among the 18000 in terms of obligXO in


rip4 <- ripple(mapthis, chr=4, window=7) 18000 total orders > summary(rip4) obligXO Initial 1 2 3 4 5 6 7 8 9 10 326 1 1 2 3 4 5 6 7 8 10 9 326
Bhat


Ramesh Bhat

unread,
Apr 11, 2019, 6:33:04 AM4/11/19
to rqtl...@googlegroups.com
Where can I find the following functions decried in chapter 4 of your book

plot.pxg(hyper, "D4Mit214")

plot.pxg(hyper, "D12Mit20")

I get the following error message
Error in plot.pxg(hyper, "D12Mit20") : could not find function “plot.pxg"


Karl Broman

unread,
Apr 11, 2019, 9:03:30 AM4/11/19
to rqtl...@googlegroups.com
Use plotPXG(). A number of functions had to be renamed; see http://rqtl.org/book/#errata

karl

Karl Broman

unread,
Apr 11, 2019, 9:04:28 AM4/11/19
to rqtl...@googlegroups.com
Use whichever one has the markers in the order that you want to save.

karl
<Map construction.docx>

Karl Broman

unread,
Apr 11, 2019, 9:09:45 AM4/11/19
to rqtl...@googlegroups.com

1. Does "summary(rip5lik)” show only the best order?
                                        LOD chrlen
Initial  1 2 3 4 5 6 7 8 9     0.0   38.2
1        1 2 3 4 5 6 7 9 8     0.1   38.4 

The summary shows the initial and any orders that appear better.

2. How to get the list of unmapped markers?
I’m not sure what you mean.

3. If window is equal to the number of markers on the chromosome, how to indicate in the following script 
rip5 <- ripple(mapthis, chr=5, window=7)
I’m not sure what you mean.
4. Reduced assumed genotyping error rate lead to increased map length: Is it always so, why?
I wouldn’t say always, but generally if you lower the assumed genotyping error rate, there will be more things viewed as double-crossovers that otherwise might be viewed as genotyping errors.

5. Can I see all the orders in
summary(rip5)
                                      obligXO
Initial  1 2 3 4 5 6 7 8 9     215
1        1 2 3 4 5 6 7 9 8     216
2        1 2 3 4 6 5 7 8 9     217

The output of ripple is a big matrix/data frame with each row being a different order.
If you type the name you’ll see all of them.

6. Can I see a particular order (say order number 101), and is the order 1 the best among the 18000 in terms of obligXO in


rip4 <- ripple(mapthis, chr=4, window=7) 18000 total orders > summary(rip4) obligXO Initial 1 2 3 4 5 6 7 8 9 10 326 1 1 2 3 4 5 6 7 8 10 9 326
Try rip4[101,]

karl

Ramesh Bhat

unread,
Apr 11, 2019, 9:25:36 AM4/11/19
to rqtl...@googlegroups.com

 

How to get the list of unmapped markers?

I’m not sure what you mean.

If there are 100 markers for mapping, say only 90 are mapped on the chromosomes. We say 10 are unmapped. Ex; C5M2 not mapped on chr 5 in “Mapthis”. Can we get a list of makers which are not mapped on any of the chromosomes?



If window is equal to the number of markers on the chromosome, how to indicate in the following script

rip5 <- ripple(mapthis, chr=5, window=7)

I’m not sure what you mean.

I do not want a window size of 7, instead I want all the markers on chr 5 for ripple. What change is to be made in the above script? Why do we fix a window size?

 

Bhat


Karl Broman

unread,
Apr 11, 2019, 9:36:13 AM4/11/19
to rqtl...@googlegroups.com


 

How to get the list of unmapped markers?

I’m not sure what you mean.

If there are 100 markers for mapping, say only 90 are mapped on the chromosomes. We say 10 are unmapped. Ex; C5M2 not mapped on chr 5 in “Mapthis”. Can we get a list of makers which are not mapped on any of the chromosomes?


You've maybe leave them on the last chromosome, and can get a list using markernames().




If window is equal to the number of markers on the chromosome, how to indicate in the following script

rip5 <- ripple(mapthis, chr=5, window=7)

I’m not sure what you mean.

I do not want a window size of 7, instead I want all the markers on chr 5 for ripple. What change is to be made in the above script? Why do we fix a window size?

 


change 7 to some other number. You fix a window size because if you have a chromosome with a lot of markers, the total number of possible orders will be too large. With window=7, you're only considered reordering 7 adjacent markers at a time.

karl

Ramesh Bhat

unread,
Apr 11, 2019, 9:52:55 AM4/11/19
to rqtl...@googlegroups.com
If there are several hundreds of markers, and many are unmapped, how to put them on the last chromosome?


Sent from my iPad
--
You received this message because you are subscribed to a topic in the Google Groups "R/qtl discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rqtl-disc/ZPwcHhO0T6Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rqtl-disc+...@googlegroups.com.

Karl Broman

unread,
Apr 11, 2019, 9:54:47 AM4/11/19
to rqtl...@googlegroups.com
You can use movemarker()

karl
You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.

Ramesh Bhat

unread,
Apr 11, 2019, 10:14:06 AM4/11/19
to rqtl...@googlegroups.com
Sorry, any example of movemarker()?
Say moving C5M2 to chro 4 (from chr 5).





Sent from my iPad

Karl Broman

unread,
Apr 11, 2019, 10:14:48 AM4/11/19
to rqtl...@googlegroups.com
Every function has a help file which includes examples.
Within R, type

  ?movemarker

karl

Ramesh Bhat

unread,
Apr 11, 2019, 10:48:14 AM4/11/19
to rqtl...@googlegroups.com
Can we know the position of the marker to be moved to a new chr?
Otherwise, it will be placed at the end of the chromosome.

Sent from my iPad

Karl Broman

unread,
Apr 11, 2019, 10:58:42 AM4/11/19
to rqtl...@googlegroups.com
you can specify the position to which you want to move it, or you can just have it placed some arbitrary distance off the end.

karl

Ramesh Bhat

unread,
Apr 11, 2019, 11:10:55 AM4/11/19
to rqtl...@googlegroups.com
Specifying a position on a new chromosome while moving a marker is possible if we know it.

Unless, we move, we will not know the position. Am I right?

In scanone, can we get the significance and effect for a marker?

In scanone, does the position of a marker influence the significance, LOd and effect?

Ramesh Bhat

unread,
Apr 12, 2019, 12:54:07 AM4/12/19
to rqtl...@googlegroups.com
Dear Karl,

Following are the scripts for Single-QTL analysis. The only change I made is to call the "hyper" file from my working directory. "hyperm" is identical to "hyper"

library(qtl)

hyper<-read.cross("csv",  file="hyperm.csv", crosstype="bc", genotypes=c(“AA”,”BB”, "AB"))

par(mfrow=c(1,2))

plotPXG(hyper, "D4Mit214")

plotPXG(hyper, "D12Mit20")

out.mr <- scanone(hyper, method="mr")

out.mr[ out.mr$chr == 12, ]

summary(out.mr, threshold=3)

max(out.mr)

plot(out.mr, chr=c(4, 12), ylab="LOD score")


But I get the following errors

summary(out.mr, threshold=3)

There were no LOD peaks above the threshold.


max(out.mr)

There were no LOD peaks above the threshold.


Kindly help me.


Ramesh Bhat

unread,
Apr 12, 2019, 5:19:33 AM4/12/19
to rqtl...@googlegroups.com
I am attempting map construction with my own data.

What do the numbers (marked red) in the following scripts mean?

mapthis <- subset(mapthis, ind=(ntyped(mapthis)>50))

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

hist(cg[lower.tri(cg)], breaks=seq(0, 1, len=101), xlab="No. matching genotypes")

plot(dropone, lod=1, ylim=c(-100,0))

mapthis <- subset(mapthis, ind=(countXO(mapthis) < 50))


Should I change for my data?


On Thu, Apr 11, 2019 at 8:28 PM Karl Broman <kbr...@gmail.com> wrote:


--

Karl Broman

unread,
Apr 12, 2019, 7:12:38 AM4/12/19
to rqtl...@googlegroups.com


On 4/11/19 10:10 AM, Ramesh Bhat wrote:
> Specifying a position on a new chromosome while moving a marker is
> possible if we know it.
>
> Unless, we move, we will not know the position. Am I right?

you might move a set of markers onto a common chromosome, in an
arbitrary order, and then try to figure out the order.

>
> In scanone, can we get the significance and effect for a marker?
>
> In scanone, does the position of a marker influence the significance,
> LOd and effect?
>
>

We determine significance with a permutation test, using scanone() with
n.perm specified.
To get estimated effects at markers, you need to use makeqtl() and fitqtl().

The positions of the markers are extremely important.

karl

Karl Broman

unread,
Apr 12, 2019, 7:14:15 AM4/12/19
to rqtl...@googlegroups.com
Don't use method="mr". Marker regression performs badly when there is a
lot of missing genotype information.

karl

On 4/11/19 11:53 PM, Ramesh Bhat wrote:
> Dear Karl,
>
> Following are the scripts for Single-QTL analysis. The only change I
> made is to call the "hyper" file from my working directory. "hyperm"
> is identical to "hyper"
>
> library(qtl)
>
> hyper<-read.cross("csv",  file="hyperm.csv", crosstype="bc",
> genotypes=c(“AA”,”BB”, "AB"))
>
> par(mfrow=c(1,2))
>
> plotPXG(hyper, "D4Mit214")
>
> plotPXG(hyper, "D12Mit20")
>
> out.mr <http://out.mr> <- scanone(hyper, method="mr")
>
> out.mr <http://out.mr>[ out.mr <http://out.mr>$chr == 12, ]
>
> summary(out.mr <http://out.mr>, threshold=3)
>
> max(out.mr <http://out.mr>)
>
> plot(out.mr <http://out.mr>, chr=c(4, 12), ylab="LOD score")
>
>
> But I get the following errors
>
> summary(out.mr <http://out.mr>, threshold=3)
>
> There were no LOD peaks above the threshold.
>
>
> max(out.mr <http://out.mr>)
>
> There were no LOD peaks above the threshold.
>
>
> Kindly help me.
>
>
>
> On Thu, Apr 11, 2019 at 8:28 PM Karl Broman <kbr...@gmail.com
> <mailto:kbr...@gmail.com>> wrote:
>
> you can specify the position to which you want to move it, or you
> can just have it placed some arbitrary distance off the end.
>
> karl
>
> On 4/11/19 9:47 AM, Ramesh Bhat wrote:
>> Can we know the position of the marker to be moved to a new chr?
>> Otherwise, it will be placed at the end of the chromosome.
>>
>> Sent from my iPad
>>
>> On 11-Apr-2019, at 7:44 PM, Karl Broman <kbr...@gmail.com
>> <mailto:kbr...@gmail.com>> wrote:
>>
>>> Every function has a help file which includes examples.
>>> Within R, type
>>>
>>>   ?movemarker
>>>
>>> karl
>>>
>>> On 4/11/19 9:13 AM, Ramesh Bhat wrote:
>>>> Sorry, any example of movemarker()?
>>>> Say moving C5M2 to chro 4 (from chr 5).
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Sent from my iPad
>>>>
>>>> On 11-Apr-2019, at 7:24 PM, Karl Broman <kbr...@gmail.com
>>>> <mailto:kbr...@gmail.com>> wrote:
>>>>
>>>>> You can use movemarker()
>>>>>
>>>>> karl
>>>>>
>>>>> On 4/11/19 8:52 AM, Ramesh Bhat wrote:
>>>>>> If there are several hundreds of markers, and many are
>>>>>> unmapped, how to put them on the last chromosome?
>>>>>>
>>>>>>
>>>>>> Sent from my iPad
>>>>>>
>>>>>> On 11-Apr-2019, at 7:06 PM, Karl Broman <kbr...@gmail.com
>>>>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>>>>> To post to this group, send email to
>>>>>>> rqtl...@googlegroups.com <mailto:rqtl...@googlegroups.com>.
>>>>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>> --
>>>>>> You received this message because you are subscribed to the
>>>>>> Google Groups "R/qtl discussion" group.
>>>>>> To unsubscribe from this group and stop receiving emails from
>>>>>> it, send an email to rqtl-disc+...@googlegroups.com
>>>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>>>> To post to this group, send email to
>>>>>> rqtl...@googlegroups.com <mailto:rqtl...@googlegroups.com>.
>>>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the
>>>>> Google Groups "R/qtl discussion" group.
>>>>> To unsubscribe from this group and stop receiving emails from
>>>>> it, send an email to rqtl-disc+...@googlegroups.com
>>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>>> To post to this group, send email to
>>>>> rqtl...@googlegroups.com <mailto:rqtl...@googlegroups.com>.
>>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>> --
>>>> You received this message because you are subscribed to the
>>>> Google Groups "R/qtl discussion" group.
>>>> To unsubscribe from this group and stop receiving emails from
>>>> it, send an email to rqtl-disc+...@googlegroups.com
>>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>>> To post to this group, send email to rqtl...@googlegroups.com
>>>> <mailto:rqtl...@googlegroups.com>.
>>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the
>>> Google Groups "R/qtl discussion" group.
>>> To unsubscribe from this group and stop receiving emails from
>>> it, send an email to rqtl-disc+...@googlegroups.com
>>> <mailto:rqtl-disc+...@googlegroups.com>.
>>> To post to this group, send email to rqtl...@googlegroups.com
>>> <mailto:rqtl...@googlegroups.com>.
>>> Visit this group at https://groups.google.com/group/rqtl-disc.
>>> For more options, visit https://groups.google.com/d/optout.
>> --
>> You received this message because you are subscribed to the
>> Google Groups "R/qtl discussion" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to rqtl-disc+...@googlegroups.com
>> <mailto:rqtl-disc+...@googlegroups.com>.
>> To post to this group, send email to rqtl...@googlegroups.com
>> <mailto:rqtl...@googlegroups.com>.
>> Visit this group at https://groups.google.com/group/rqtl-disc.
>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google
> Groups "R/qtl discussion" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to rqtl-disc+...@googlegroups.com
> <mailto:rqtl-disc+...@googlegroups.com>.
> To post to this group, send email to rqtl...@googlegroups.com
> <mailto:rqtl...@googlegroups.com>.
> Visit this group at https://groups.google.com/group/rqtl-disc.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
> --
> Ramesh S. Bhat
> Professor and Head
> Department of Biotechnology
> University of Agricultural Sciences, Dharwad
> PIN: 580 005, Dharwad, Karnataka, India
> Ph: +91-836-2214457, Mobile: +91-9945667300
> email: bha...@uasd.in <mailto:bha...@uasd.in>
>
> --
> You received this message because you are subscribed to the Google
> Groups "R/qtl discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to rqtl-disc+...@googlegroups.com
> <mailto:rqtl-disc+...@googlegroups.com>.
> To post to this group, send email to rqtl...@googlegroups.com
> <mailto:rqtl...@googlegroups.com>.

Karl Broman

unread,
Apr 12, 2019, 7:17:33 AM4/12/19
to rqtl...@googlegroups.com


On 4/12/19 4:18 AM, Ramesh Bhat wrote:
> I am attempting map construction with my own data.
>
> What do the numbers (marked red) in the following scripts mean?
>
> mapthis <- subset(mapthis, ind=(ntyped(mapthis)>50))
>
subsetting to individuals who have genotype data for >50 markers.

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

determining markers that have fewer than 200 genotypes.

> hist(cg[lower.tri(cg)], breaks=seq(0, 1, len=101), xlab="No. matching
> genotypes")
>

making a histogram with 100 bins

> plot(dropone, lod=1, ylim=c(-100,0))
>
cutoff for the y-axis limit

> mapthis <- subset(mapthis, ind=(countXO(mapthis) < 50))
>
>
subsetting to individuals with <50 crossovers.

> Should I change for my data?
>
>

yes


karl

Ramesh Bhat

unread,
Apr 12, 2019, 7:19:15 AM4/12/19
to rqtl...@googlegroups.com
The question is hyper does not work, but hyper works thought the contents are exactly same.

Which one one do you suggest instead of “mr"?
> To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
> To post to this group, send email to rqtl...@googlegroups.com.

Ramesh Bhat

unread,
Apr 12, 2019, 7:25:49 AM4/12/19
to rqtl...@googlegroups.com
Okay, I shall try with method="em" or method="hk”.
> To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
> To post to this group, send email to rqtl...@googlegroups.com.

Ramesh Bhat

unread,
Apr 12, 2019, 7:37:32 AM4/12/19
to rqtl...@googlegroups.com
“em”, “mr” and “hk” methods work for the data(hyper). But do not work when I use the same file “hyper” from my working directory.

Please help.
> To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
> To post to this group, send email to rqtl...@googlegroups.com.

Ramesh Bhat

unread,
Apr 12, 2019, 7:48:00 AM4/12/19
to rqtl...@googlegroups.com
A marker listed under
todrop <- names(nt.bymar[nt.bymar < 200])

but appears in the final
plotMap(mapthis, show.marker.names=TRUE)

Is it not dropped from mapping?




--
You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
To post to this group, send email to rqtl...@googlegroups.com.
Visit this group at https://groups.google.com/group/rqtl-disc.
For more options, visit https://groups.google.com/d/optout.

Karl Broman

unread,
Apr 12, 2019, 7:55:37 AM4/12/19
to rqtl...@googlegroups.com
I don’t know what’s gone wrong.

karl

Karl Broman

unread,
Apr 12, 2019, 7:57:07 AM4/12/19
to rqtl...@googlegroups.com
Did you skip the step

    mapthis <- drop.markers(mapthis, todrop)

karl

Ramesh Bhat

unread,
Apr 12, 2019, 7:58:24 AM4/12/19
to rqtl...@googlegroups.com
No, it was included.

Ramesh Bhat

unread,
Apr 12, 2019, 7:59:14 AM4/12/19
to rqtl...@googlegroups.com
“hyper” file which was used from my working directory is here.

hyper.csv

Karl Broman

unread,
Apr 12, 2019, 8:00:57 AM4/12/19
to rqtl...@googlegroups.com
The genotypes are coded BB and BA so you need to use genotypes=c(“BB”, “BA”) when you call read.cross()

karl

> On Apr 12, 2019, at 6:59 AM, Ramesh Bhat <bhatra...@gmail.com> wrote:
>
> “hyper” file which was used from my working directory is here.
>
> --
> You received this message because you are subscribed to the Google Groups "R/qtl discussion" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rqtl-disc+...@googlegroups.com.
> To post to this group, send email to rqtl...@googlegroups.com.
> Visit this group at https://groups.google.com/group/rqtl-disc.
> For more options, visit https://groups.google.com/d/optout.
> <hyper.csv>

Ramesh Bhat

unread,
Apr 12, 2019, 8:01:47 AM4/12/19
to rqtl...@googlegroups.com
I am working on peanut (2n=4x=40), accordingly modified the chromosome numbers.


Ramesh Bhat

unread,
Apr 12, 2019, 8:05:33 AM4/12/19