Mercurial > repos > artbio > bigwig_to_wig
diff bigwig_to_wig.sh @ 1:ac8ea1ca115d draft default tip
planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/main/tools/bigwig_to_wig commit 85bdb086a4aa403465844a0b10399440b31b65a7
author | artbio |
---|---|
date | Fri, 06 Oct 2023 00:19:35 +0000 |
parents | ee2fbee916f7 |
children |
line wrap: on
line diff
--- a/bigwig_to_wig.sh Tue Sep 25 17:41:20 2018 -0400 +++ b/bigwig_to_wig.sh Fri Oct 06 00:19:35 2023 +0000 @@ -54,22 +54,22 @@ #for each chromsome while read line; do - - cur_chr=$(echo $line | cut --delimiter=" " -f1) - cur_length=$(echo $line | cut --delimiter=" " -f2) - + + cur_chr=$(echo $line | cut -d " " -f1) + cur_length=$(echo $line | cut -d " " -f2) + n_bins=$(echo "scale=0; (${cur_length}-${step_size})/${bin_size}" | bc) - + start=1 stop=$(echo "$n_bins * $bin_size" | bc) #write header line for each chromosome echo "fixedStep chrom=$cur_chr start=$start step=$step_size span=$step_size" - + #get densities along chr in n_bins with chosen bin_size and step_size (giving overlap in bins) nice bigWigSummary $bigwig_file $cur_chr $start $stop $n_bins | perl -pe 's/\t/\n/g' | perl -pe "s/n\/a/0/" #gives warning if no data in/for current chromosome - + done < $org_assembly_file #rm tmp