caravagnalab / CNAqc

CNAqc - Copy Number Alteration (CNA) Quality Check package
GNU General Public License v3.0
17 stars 8 forks source link

blank_genome: an alternative code #13

Closed qingjian1991 closed 2 years ago

qingjian1991 commented 2 years ago

Hi:

I made some changes on function blank_genome() for better visualizations on CNV plot, please review my code.

The figure before changes, The 1q has a complex CNAs changes:

image

The figure after changes:

image

The changed code is here: blank_genome.R

Thanks.

Qingjian Chen

caravagn commented 2 years ago

Hi @qingjian1991 ,

Thanks for the message.

Is the only change that you are doing this?

    #set the chr names in the centromer positions.
    scale_x_continuous(
      breaks = c(0, reference_coordinates$centromerStart, upp),
      labels = c("", gsub(pattern = 'chr', replacement = '', reference_coordinates$chr), "")
    )

Could you show with some plots how does this visualise when you do not follow the circular layout (i.e., as a single sample)?

Btw, we'd have to go for a PR if we accept this modification.

qingjian1991 commented 2 years ago

Is the only change that you are doing this?

I made two main changes to this code. One is as your notice.

Another change is here. The origin code used dashed lines to separate the chromosomes and solid lines to indicate the positions of the centromere. The modified code changed the orders, by using the solid lines to separate the chromosomes and dashed lines to indicate the position of the centromere.

image

caravagn commented 2 years ago

I think it is OK, open a PR if you want me to get this into the code.

caravagn commented 2 years ago

Merged #16 thanks @caravagn