Editing HowTo

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 1: Line 1:
Successful tiny examples.
 
 
 
==In bash, at Moria==
 
==In bash, at Moria==
  
Line 11: Line 9:
 
Extract the first column:
 
Extract the first column:
 
  awk '{print $1}' sizes.out > sizesQ.out
 
  awk '{print $1}' sizes.out > sizesQ.out
 
Get the lengths of the reads of a fastq file (after [http://onetipperday.sterding.com/2012/05/simple-way-to-get-reads-length.html this]):
 
cat /Users/Moria/Desktop/g043.refined.1.fq | awk '{if(NR%4==2) print length($1)}' > /Users/Moria/Desktop/g043.refined.1.EXTRACT.fq
 
  
 
==At CUBE==
 
==At CUBE==
Line 20: Line 15:
 
  for file in /proj/genomes/Thiobios/data/ThiobiosMAGs/* ; do  gc  $file >> gc.out ; done
 
  for file in /proj/genomes/Thiobios/data/ThiobiosMAGs/* ; do  gc  $file >> gc.out ; done
 
  awk '{print $4}' gc.out > gcQ.out
 
  awk '{print $4}' gc.out > gcQ.out
 
Assess completeness, contamination and heterogeneity of the genomes in a folder:
 
checkm lineage_wf -t 8 /proj/genomes/Thiobios/results/2017_08_24_checkM/data /proj/genomes/Thiobios/results/2017_08_24_checkM/therest.checkm --tab_table --file therest.checkm.out
 
 
Check for tRNAs of the genomes in a folder:
 
cd /proj/genomes/Thiobios/data/ThiobiosMAGs
 
for file in ./* ; do tRNAscan-SE -B $file -o /proj/genomes/Thiobios/results/2017_08_25_tRNAscan-SE/$file.tRNAscan-SE.out ; done
 
 
==With R (and RStudio)==
 
Extract a part of a sequence, using ''ape'':
 
s2c(c2s(as.matrix(g43Z2[1])[44214:47213]))
 
 
Build a Maximum Likelihood tree, using ''ape'' and ''phangorn'':
 
ali.16SB<-as.phyDat(ssuAlignB[c(2:10,1),segSitB])
 
dist.16SB<-dist.ml(ali.16SB)
 
tree.16S.njB<-root(NJ(dist.16SB),10)
 
mod.16SB<-modelTest(ali.16SB,model="all",multicore=TRUE)
 
env.16SB<-attr(mod.16SB,"env")
 
fitStart.16SB<-eval(get(mod.16SB$Model[which.min(mod.16SB$BIC)],env.16SB),env.16SB) # mod.16SB$Model[which.min(mod.16SB$BIC)]="K80"
 
fitNJ.16SB<-pml(tree.16S.njB,ali.16SB)
 
fit.16SB<-optim.pml(fitNJ.16SB,rearrangement="stochastic",model="K80",optInv=FALSE,optGamma=FALSE)
 
bs.16SB<-bootstrap.pml(fit.16SB,bs=1000,optNni=TRUE,multicore=TRUE)
 
plotBS(fit.16SB$tree,bs.16SB,p=50,type="p",bs.adj=c(1.2,-.7))
 
add.scale.bar()
 

Please note that all contributions to salvaEwiki are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see SalvaEwiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)
Retrieved from "http://salvae.net/wiki/HowTo"