I'm trying to use TSS predator on my RNA-Seq data retrieved from SRA db, the tool requires a wiggle file for each condition (plus and minus), I don't understand which kind of file stands are needed for enriched fields.
My question is: these files can be retrieved somewhere in RNA-Seq data analysis or are part of the experimental workflow?
Do you use TSSpredator standalone? I would suggest installing ANNOgesic, it makes it easier to do the whole analysis and adds quite a lot more functionality.
To answer your question, wiggle is just a format of coverage. You can make it from the alignment BAM file. There's a frustrating lack of consistency in .wig definition though (e.g. if you will make a .bigWig and convert it to wig, it won't work for ANNOgesic, even though it's totally fine for visualisation).
Also, ANNOgesic requires a strand-specific wig file. Here's a small script I wrote for making wig files that work with it nicely. You'll need to save this as some file, e.g. make_proper_wig.pl, and make it executable. You also need to have samtools (v1+) installed.
#!/usr/bin/env perl
use strict;
use warnings;if($#ARGV < 1) {
print "Usage: ./make_proper_wig.pl <bam> <strand>\n";
print "Requires samtools v1+; strand can be + or -\n";exit 1
}
my $bam=shift @ARGV;
my $strand=shift @ARGV;if($strand ne "+"&&$strand ne "-"){
die "ERROR: Strand can be + or - only!\n";}if($strand eq "+"){
system "samtools view -b -F 16 $bam | samtools depth -d 0 - > $bam.$$.out";}else{
system "samtools view -b -f 16 $bam | samtools depth -d 0 - > $bam.$$.out";}
open COV,"<","$bam.$$.out" or die "$!";
my $tag=$bam;$tag=~ s/.bam//g;printf"track type=wiggle_0 name=%s\n",$tag;
my $lastC="";while(<COV>){
my ($c, $start, $depth)=split;
print "variableStep chrom=$c span=1\n"if($c ne $lastC);$lastC=$c;if($strand eq "+"){
print "$start\t$depth\n";}else{
print "$start\t-$depth\n";}}
system "rm $bam.$$.out";
close COV;
Thank you so much for the explanation, i'm trying to use TSSpredator standalone, but my aim is to find TSS from my bam files, so I was looking around. i'll try ANNOgesic :)
Thank you so much for the explanation, i'm trying to use TSSpredator standalone, but my aim is to find TSS from my bam files, so I was looking around. i'll try ANNOgesic :)