help understanding this code

R programming language resources Forums Graphing help understanding this code

Tagged: ,

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #1106
    AnnaT
    Member

    I have this code, it creates a map of regions on chromosomes depicted as grey lines. I have this script from an online tool and I want to understand the format of the input. In the online tool I upload a BED file (chr/start/end) and the input for the script is changes to “rect(3389967.000000,1,3390328.000000,11, col=”orange”, border=”orange”)” The first number “3389967” is my starting position and ” 3390328 ” the endposition, but what do the “1” and the “11” mean? I really would like to understand this, so I would be really happy if you answer

    par(mar=c(4.2, 0.2, 0.2, 14.2))
    plot.new()
    plot.window(xlim=c(0,197195432),ylim=c(0,420))
    axis(1)
    axis(4, at=((1:21)*20)-14, lab=c(“chr1: 1-197195432″,”chr2: 1-181748087″,”chr3: 1-159599783″,”chr4: 1-155630120″,”chr5: 1-152537259″,”chr6: 1-149517037″,”chr7: 1-152524553″,”chr8: 1-131738871″,”chr9: 1-124076172″,”chr10: 1-129993255″,”chr11: 1-121843856″,”chr12: 1-121257530″,”chr13: 1-120284312″,”chr14: 1-125194864″,”chr15: 1-103494974″,”chr16: 1-98319150″,”chr17: 1-95272651″,”chr18: 1-90772031″,”chr19: 1-61342430″,”chrX: 1-166650296″,”chrY: 1-15902555″), las=1)
    rect(0.000000,6,197195432.000000,4, col=”lightgray”, border=”lightgray”)
    rect(3389967.000000,1,3390328.000000,11, col=”orange”, border=”orange”)
    rect(6473141.000000,1,6474118.000000,11, col=”orange”, border=”orange”)
    rect(0.000000,26,181748087.000000,24, col=”lightgray”, border=”lightgray”)
    rect(3089906.000000,21,3090291.000000,31, col=”orange”, border=”orange”)
    rect(3135508.000000,21,3135940.000000,31, col=”orange”, border=”orange”)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.