tangerzhang / ALLHiC

ALLHiC: phasing and scaffolding polyploid genomes based on Hi-C data
174 stars 39 forks source link

partition generate empty fiel #58

Closed jun3234 closed 4 years ago

jun3234 commented 4 years ago

I run this command as follow and the partition.pl generate empty file with just chr01 directory.

draft_asm=litchi.contigs.fasta
partition.pl -g Allele.gene.table -r $draft_asm -b sample.clean.bam -d wrk_dir 1>HG_parttion.log 2>&1

I found the Allele.gene.table and Allele.ctg.table are different to your post in https://github.com/tangerzhang/ALLHiC/wiki/ALLHiC:-identify-allelic-contigs while I used the same pipline in that page.

And my Allele.gene.table like:

Acyan01G0001000 chr01 121248 LITCHI034715, NA
Acyan01G0002000 chr01 455756 LITCHI015286, LITCHI034706,
Acyan01G0002100 chr01 460633 LITCHI015287, LITCHI034705,
Acyan01G0002200 chr01 470217 LITCHI015288, LITCHI034704,
Acyan01G0002300 chr01 473171 LITCHI015289, LITCHI034703,
Acyan01G0002400 chr01 481720 LITCHI034702, LITCHI015290,
Acyan01G0002500 chr01 518690 LITCHI015669, LITCHI034701,
Acyan01G0002600 chr01 531431 LITCHI034700, LITCHI015670,
Acyan01G0002800 chr01 563876 LITCHI015675, LITCHI034697,
Acyan01G0002900 chr01 570771 LITCHI015676, LITCHI034696,

And Allele.ctg.table like:

chr01 121248
chr02 305700
chr03 14690
chr04 44447
chr05 638524
chr06 24554
chr07 73333
chr08 8314
chr09 61186
chr10 26867

If what I thought is true, may this foreach my $i(3..$#data) should change to foreach my $i(4..$#data) in partition.pl scripts? I tried, but it can't work.

### Assign ctgs to pre-defined clusters

my %ctgdb;
open(IN, $table) or die"";
while(<IN>){
    chomp;
    my @data = split(/\s+/,$_);
    my $chrn = $data[1];
    foreach my $i(3..$#data){
        my $ctg = (split/,/,$data[$i])[1];
        $ctgdb{$ctg}->{$chrn}++;
        }
    }
close IN;

Could you tell me how to make parition.pl works? to change Allel.gene.table?

Very thanks. jun3234

jun3234 commented 4 years ago

I made a mistake in generating Allele.gene.table. Sorry.