{"__v":0,"_id":"57a1dce05220910e002a16ed","category":{"project":"57618347b65324200072d6a5","version":"57618347b65324200072d6a8","_id":"5761912d207db7170022fbe9","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-06-15T17:32:29.121Z","from_sync":false,"order":2,"slug":"workflows","title":"Workflows"},"parentDoc":null,"project":"57618347b65324200072d6a5","user":"57617c8caa540f3600bfed20","version":{"__v":8,"_id":"57618347b65324200072d6a8","project":"57618347b65324200072d6a5","createdAt":"2016-06-15T16:33:11.587Z","releaseDate":"2016-06-15T16:33:11.587Z","categories":["57618347b65324200072d6a9","5761912d207db7170022fbe9","57619455a7c9f729009a74e0","576e8ae1f37ab41700147471","5797b8e5209a6e0e00b8321b","57989a8817ced017003c4c69","579ca6f3d46f960e0029a8ec","579ca703fefb1d0e00c94f06"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"blobtools v0.9.19","version_clean":"0.9.19","version":"0.9.19"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-08-03T12:00:32.962Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"### Motivation\n* Sequencing library preparation methods can differ in their ability to capture regions of particular GC contents\n* A quick way of visualising differential coverage of sequences in an assembly in relation to GC is a covplot, where the sequences are coloured by GC-content category\n\n### Example\n* For a reference genome, two new sequencing libraries were generated:\n * a WGA (Whole-Genome-Amplified) sequencing library   \n * a WGS (Whole-Genome) sequencing library\n* A catcolour file is generate from the reference genome \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"#Generate a table view of the blobDB\\nblobtools view -i blobDB.json\\n\\n# Extract sequenceID and GC\\ngrep -v '^#' blobDB.table.txt |\\\\\\n cut -f1,3 > blobDB.id.gc.txt\\n\\n# Divide into GC categories \\n# <20%\\nawk '$2 < 0.25' blobDB.id.gc.txt | \\\\\\n\\tcut -f1 | \\\\\\n  perl -lne 'print $_.\\\",<20%\\\"' \\\\\\n  > blobDB.id.gc.catcolour.txt \\n# 20 - 29%\\nawk '$2 >= 0.20 && $2 < 0.30' blobDB.id.gc.txt | \\\\\\n\\tcut -f1 | \\\\\\n  perl -lne 'print $_.\\\",20-29%\\\"' \\\\\\n  >> blobDB.id.gc.catcolour.txt\\n# ... etc\\n\\n# Generate covplot\\nblobtools covplot \\\\ \\n\\t-i blobDB.json \\\\\\n  -c WGA.lib.bam.cov \\\\\\n  --catcolour blobDB.id.gc.catcolour.txt \\\\\\n  --notitle \\\\\\n  --ylabel WGA-resequencing-library \\\\\\n  --xlabel WGS-resequencing-library \\\\\",\n      \"language\": \"text\"\n    }\n  ]\n}\n[/block]\n\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/d358fa0-test.globodera_pallida.PRJEB123.WBPS6.genomic.blobDB.json.bestsum.phylum.p7.span.100.Gp_Pa1_12-17_WGA1_vs_ref_bam_cov.catcolour.covplot.cov4.png\",\n        \"test.globodera_pallida.PRJEB123.WBPS6.genomic.blobDB.json.bestsum.phylum.p7.span.100.Gp_Pa1_12-17_WGA1_vs_ref_bam_cov.catcolour.covplot.cov4.png\",\n        3500,\n        3500,\n        \"#f3f3f3\"\n      ],\n      \"caption\": \"Covplot coloured by GC-content categories showing the difference in coverage between a WGA resquencing library and a WGS resequencing library\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"colour-a-covplot-by-gc-categories","type":"basic","title":"Colour a covplot by GC-categories"}

Colour a covplot by GC-categories


### Motivation * Sequencing library preparation methods can differ in their ability to capture regions of particular GC contents * A quick way of visualising differential coverage of sequences in an assembly in relation to GC is a covplot, where the sequences are coloured by GC-content category ### Example * For a reference genome, two new sequencing libraries were generated: * a WGA (Whole-Genome-Amplified) sequencing library * a WGS (Whole-Genome) sequencing library * A catcolour file is generate from the reference genome [block:code] { "codes": [ { "code": "#Generate a table view of the blobDB\nblobtools view -i blobDB.json\n\n# Extract sequenceID and GC\ngrep -v '^#' blobDB.table.txt |\\\n cut -f1,3 > blobDB.id.gc.txt\n\n# Divide into GC categories \n# <20%\nawk '$2 < 0.25' blobDB.id.gc.txt | \\\n\tcut -f1 | \\\n perl -lne 'print $_.\",<20%\"' \\\n > blobDB.id.gc.catcolour.txt \n# 20 - 29%\nawk '$2 >= 0.20 && $2 < 0.30' blobDB.id.gc.txt | \\\n\tcut -f1 | \\\n perl -lne 'print $_.\",20-29%\"' \\\n >> blobDB.id.gc.catcolour.txt\n# ... etc\n\n# Generate covplot\nblobtools covplot \\ \n\t-i blobDB.json \\\n -c WGA.lib.bam.cov \\\n --catcolour blobDB.id.gc.catcolour.txt \\\n --notitle \\\n --ylabel WGA-resequencing-library \\\n --xlabel WGS-resequencing-library \\", "language": "text" } ] } [/block] [block:image] { "images": [ { "image": [ "https://files.readme.io/d358fa0-test.globodera_pallida.PRJEB123.WBPS6.genomic.blobDB.json.bestsum.phylum.p7.span.100.Gp_Pa1_12-17_WGA1_vs_ref_bam_cov.catcolour.covplot.cov4.png", "test.globodera_pallida.PRJEB123.WBPS6.genomic.blobDB.json.bestsum.phylum.p7.span.100.Gp_Pa1_12-17_WGA1_vs_ref_bam_cov.catcolour.covplot.cov4.png", 3500, 3500, "#f3f3f3" ], "caption": "Covplot coloured by GC-content categories showing the difference in coverage between a WGA resquencing library and a WGS resequencing library" } ] } [/block]