So in theory is isn't an issue to visualize the transcripts, if one follows a few steps.
1) Following using the --writeMapping
flag when running salmon
the pseudosam file needs to be sorted using samtools
samtools sort -o /path/to/output.bam /path/to/input.sam
2) After sorting, the sorted .bam
file needs to be indexed.
samtools index -b path/to/sorted.bam
3) Finally, the transciptome needs to be indexed as well.
samtools faidx path/to/gencode.v28.transcripts.fa -o path/to/gencode.v28.transcripts.fai
If when running salmon
the --gencode
flag was used, you will find that the gencode file that was used for indexing, when uploaded to IGV will not match the alignment file and this is because "the flag splits the transcript name at the first '|' character".
A quick and "dirty" fix for that is to do the same to the gencode fasta file, as such.
awk 'BEGIN{FS="|"}{if(/^>/){print $1}else{print $0}}' ./gencode.v28.transcripts.fa > ./TranscriptNameGencode.v28.transcripts.fa
I hope this helps, and thanks to @rob-p @k3yavi @Michael Love and @daviesrob for answering questions along the way :)
Thanks for the updates.