Skip to content

Commit

Permalink
Fixed some bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
zy-optimistic committed Jun 8, 2023
1 parent 19bdc32 commit c9db5b6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion scripts/pipeline.pl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ =head2 Global setting
=head2 Busco setting
-l Busco lineage dataset, odb10(https://busco-data.ezlab.org/v5/data/) is supported,
-l Busco lineage dataset, odb10(https://busco-data.ezlab.org/v5/data/lineages/) is supported,
busco will not run without lineage dataset.
-s Species used for augustus training in busco.
Expand Down
12 changes: 6 additions & 6 deletions scripts/run_hisat2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
my $out_file = "${prefix_out}_TRANS_mapping.bam";

##Creating a HISAT2 index
my $index_cmd = "hisat2-build ";
my $index_cmd = "$hisat2_build ";
$index_cmd .= "-p $threads " if $threads;
$index_cmd .= "$assembly $index";
_system($index_cmd,$sys_run);
Expand All @@ -88,11 +88,11 @@
my $hisat2_paired_sort_bam = "$prefix_out.paired.sorted.bam";
#my $hisat2_paired_markdup = "$prefix_out.paired.sorted.mkdup.bam";
##run hisat2
my $hisat2_cmd = "hisat2 ";
my $hisat2_cmd = "$hisat2 ";
$hisat2_cmd .= "-p $threads " if $threads;
$hisat2_cmd .= "-x $index ";
for my $i ( 0..$#{ $flist{paired} } ) {
my $hisat2_cmd = "hisat2 ";
my $hisat2_cmd = "$hisat2 ";
$hisat2_cmd .= "-p $threads " if $threads;
$hisat2_cmd .= "-x $index ";
my $reads1 = $flist{paired}[$i][0];
Expand All @@ -117,7 +117,7 @@
$view_cmd .= "-bS $hisat2_paired_out > $hisat2_paired_bam";
_system($view_cmd, $sys_run);
##samtools sort
my $sort_cmd = "samtools sort ";
my $sort_cmd = "$samtools sort ";
$sort_cmd .= "-@ $threads " if $threads;
$sort_cmd .= "$hisat2_paired_bam -o $hisat2_paired_sort_bam";
_system ($sort_cmd,$sys_run);
Expand All @@ -134,7 +134,7 @@

##run hisat2
for my $i ( 0..$#{ $flist{single} } ){
my $hisat2_cmd = "hisat2 ";
my $hisat2_cmd = "$hisat2 ";
$hisat2_cmd .= "-p $threads " if $threads;
$hisat2_cmd .= "-x $index ";
my $reads1 = $flist{single}[0];
Expand All @@ -158,7 +158,7 @@
$view_cmd .= "-bS $hisat2_single_out > $hisat2_single_bam";
_system($view_cmd, $sys_run);
##samtools sort
my $sort_cmd = "samtools sort ";
my $sort_cmd = "$samtools sort ";
$sort_cmd .= "-@ $threads " if $threads;
$sort_cmd .= "$hisat2_single_bam -o $hisat2_single_sort_bam";
_system ($sort_cmd,$sys_run);
Expand Down
4 changes: 2 additions & 2 deletions scripts/run_minimap2.pl
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}

##sort
my $sort_cmd = "samtools sort -O BAM ";
my $sort_cmd = "$samtools sort -O BAM ";
$sort_cmd .= "-@ $threads " if $threads;
$temp = $sort_cmd;
foreach (@sam_list){
Expand All @@ -122,7 +122,7 @@

##merge
if (@file_list > 1){
my $merge_cmd = "samtools merge ";
my $merge_cmd = "$samtools merge ";
$merge_cmd .= "-@ $threads " if $threads;
$merge_cmd .= "-h $sam_list[0].sorted.bam $out_bam ";
$merge_cmd .= join (" ",map {"$_.sorted.bam"} @sam_list);
Expand Down
4 changes: 2 additions & 2 deletions scripts/var_calling.pl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
_system($markdup_cmd, $mode);
$bam = $markdup;
#index
my $index_cmd = "samtools index ";
my $index_cmd = "$samtools index ";
$index_cmd .= "-@ $threads " if $threads;
$index_cmd .= "$bam";
_system($index_cmd, $mode);
Expand All @@ -93,7 +93,7 @@
$semaphore->up($threads);

##merge all vcfs into one
my $concat = "bcftools concat $prefix_out.*.flt.vcf > $var_result";
my $concat = "$bcftools concat $prefix_out.*.flt.vcf > $var_result";
_system($concat, $mode);


Expand Down

0 comments on commit c9db5b6

Please sign in to comment.