Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add warning when chromosome in track is not defined in genome #17

Open
koalive opened this issue Mar 12, 2021 · 0 comments
Open

Add warning when chromosome in track is not defined in genome #17

koalive opened this issue Mar 12, 2021 · 0 comments

Comments

@koalive
Copy link
Contributor

koalive commented Mar 12, 2021

I'm using BioCircos with the short script here attached. I wanted to contact you because the SNP track does not appear on the output graph and I couldn't find any reasons why. First, I set the chromosom number and length. Then I put a Background track in the object "tracklist". It's working so far. But when I add BioCircosSNPTrack, there is no difference in the output, like if I didn't add anything. Could you please help me with this problem ?

Shortened script:

library("BioCircos")
myGenome = list("A1"= 59.94, "A2" = 74.9, "A3" = 84.1,
                "A4" = 45.63, "A5" = 72.67, "A6" = 75.02, 
                "A7" = 53.76, "A8" = 54.79, "A9" = 98.81,
                "A10" = 51.8, "C1" = 54.99, "C2" = 70.61, 
                "C3" = 104.07, "C4" = 88.17, "C5" = 84.18, 
                "C6" = 60.23, "C7" = 63.12, "C8" = 69.55,
                "C9" = 75.3)

tracklist = BioCircosBackgroundTrack("myBackgroundTrack", 
	minRadius = 0.9, 
	maxRadius=0.9, 
	borderColors="#AAAAAA", 
	borderSize=0.6, 
	fillColors="#BBBBBB") + 
	BioCircosBackgroundTrack("myBackgroundTrack", 
		minRadius = 0.8, 
		maxRadius=0.8, 
		borderColors="#AAAAAA", 
		borderSize=0.6, 
		fillColors="#BBBBBB")
points_chromosomesLPR = c('A2', 'A5', 'A6', 'A07', 'C8', 'C9')
points_coordinatesLPR = c(14.8, 48.3, 4, 47.4, 64, 2.7)
points_values = 0:1
tracklist = tracklist + BioCircosSNPTrack('mySNPTrack', 
	points_chromosomesLPR, 
	points_coordinatesLPR, 
	points_values, 
	colors=c("black"), 
	minRadius = 0.8, 
	maxRadius = 0.9, 
	size = 2) 

BioCircos(tracklist, genome = myGenome, geomeFillColor = c("red"), 
	genomeTicksDisplay = TRUE, genomeLabelTextSize = "14pt")

Dear X,

It seems the main issue is a typo when you define the chromosome list for your SNP track (you didn't define the "A07" chromosome in points_chromosomesLPR, so I assume you meant "A7"). If I correct that and call BioCircos again, the SNPs are displayed correctly.
I guess adding a warning to the package when the chromosome is not defined would help avoiding these errors, so I'll add that as a suggestion on Github.
Cheers,

Loan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant