tjiangHIT / cuteSV

Long read based human genomic structural variation detection with cuteSV
MIT License
245 stars 36 forks source link

bed file feature #105

Open QuentinBoone opened 1 year ago

QuentinBoone commented 1 year ago

Hi,

I am currently on version cuteSV 2.0.1 and was wondering if there was a way of using a bed file to restrict cuteSV input bam file without having to use a tool such as samtools view to generate a new bam file. If there is no way of using a bed file is it a feature that is, or could be, considered?

Best regards, Quentin

Meltpinkg commented 1 year ago

Hi, Quentin! @QuentinBoone

The event that you mentioned has not been implemented in cuteSV. And I think it is significative that can be contained in our further work. But I'm still a little confused at some unclear details about the exact meaning of bed file that you mentioned. There are two ways to comprehend the bed file:

  1. The bed file represents the SV information that need to be regenotyped. This is the mission of force calling, and you can use other tools to transfer the bed file into vcf file, and apply it as the -Ivcf parameter to achieve the force calling of the bed.
  2. The bed file represents the region to be considered for the SV discovery calling. For this condition, we'll extract the start and end of the region in the bed file and apply SV calling only in these regions.

Therefore, I'd like to first make sure the meaning of the input file. And we'll make further modification on it. Hope it will help.

Best, Shuqi

QuentinBoone commented 1 year ago

Thank you Shuqi for your quick response, I am using the bed file to represent regions to be considered for structural variant calling, so the second way you mentioned. The idea was to reduce the runtime when a large amount of unplaced scaffolds had to be considered by limiting their number to the ones that are the most likely to produce results. To do that I created a bed file with the regions i wanted to study, and was hoping to be able to directly pass this bed file to cuteSV to get the variants.

Best regards, Quentin

Meltpinkg commented 1 year ago

Hello, Quentin

I understand that event now. It is a nice idea and has not been implemented in cuteSV now. I'd like to add it to my to-do-list and achieve this function ini cuteSV in the newest release. The work will be released in one week approximately. And I will reply to this issue when the new version is release. Thanks for your great idea and kind explanation!

Best, Shuqi

Meltpinkg commented 1 year ago

Hello, Quentin @QuentinBoone

We have finished the update. With the newly added parameter "-include_bed", you can input a bed file. When this parameter is enabled, cuteSV will only consider the regions in the bed file to detect SVs. You can git clone the newest code in cuteSV's GitHub to achieve this function. Hope it will help!

Best, Shuqi

QuentinBoone commented 1 year ago

Hi,

Thank you for this quick update, i will be trying it out shortly.

Best regards, Quentin