Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
how_to [2022/08/04 16:53] – [Add only modified changes and ignore untracked files using git.] adminhow_to [2022/08/10 02:20] – [Run simultaneous jobs (on multiple files) in a single mpi on a cluster?] mohsen
Line 2: Line 2:
  
 This is a collection of short answers and links to some miscellaneous questions that we have had while doing research in Oncinfo. This can also be a useful resource for other scholars in the field of computational biology with similar interests and challenges. This is a collection of short answers and links to some miscellaneous questions that we have had while doing research in Oncinfo. This can also be a useful resource for other scholars in the field of computational biology with similar interests and challenges.
 +
 +----
 +
 +==== Extend   bam  reads to a fixed fragment size to better view peaks with   igv   ====
 +
 +Assume you have ''input.bam'' which contains mapped short single-end sequence reads, but you know the fragment size=''100''. With the following command, you can make a bam file that have the extended reads, but you will miss the actual reads. This helps to better visualize the actual read signal:
 +<code>
 +bedtools bamtobed -i input.bam | \
 +awk -F'\t' 'BEGIN {OFS = FS} {if ($6=="+") {$3=$2+99} else {$2=$3-99}; if ($2<0) {$2=0}; print $0;}' | \
 +bedtools bedtobam -i -> extended_input.bam
 +</code>
  
 ---- ----
Line 112: Line 123:
 ---- ----
  
-===== Add only modified changes and ignore untracked files using git=====+===== Add only modified changes and ignore untracked files using git=====
  
 Using newer version of `git` (e.g., >=2.32.1), Using newer version of `git` (e.g., >=2.32.1),