This is only really useful to Sanger users...
On my mac laptop, to install Java, I had to:
1) Go to the 'Applications' folder, and click on 'Managed Software Center'
2) Select 'Oracle Java JDK 8', and click install.
3) Click on 'Install requested' at top right. Then a 'checking for updates' screen appears. This seems to install Java.
4) In a xterm window on the Mac, I can then type a java command, e.g.: (to run a Java program called webin-cli-root-1.4.2.jar)
% java -jar webin-cli-root-1.4.2.jar
Runs fine!
Thursday, 18 October 2018
Monday, 15 October 2018
Getting raw sequence data at Sanger
This is useful for Sanger people only: how to get some data off our Sanger irods system.
1) Request an irods account from the service desk, as explained on the irods wiki page.
2) Make sure your ..softwarerc has irods in, so you can use irods commands.
3) (Steve told me): first move to a directory where you want to transfer the cram files, and then run the following:
(e.g. for run 27104, lane 8)
kinit
< input password > # you need to input your irods password here
icd /seq/27104
ils | grep "27104_8.*cram"$ | grep -v "phix" | while read -r list; do iget /seq/27104/$list . ; done &
# once you cram files have downloaded, convert crams to fastq
bsub.py 1 cram2fq ~sd21/bash_scripts/run_cram2fastq
Note the script ~sd21/bash_scripts/run_cram2fastq says:
for i in *cram; do samtools view -ub --threads 4 ${i} | samtools sort -n - | samtools fastq -1 ${i%.cram}_1.fastq.gz -2 ${i%.cram}_2.fastq.gz - ; done
Note: to get this script to run for me, I had to make a copy of it and change the path for samtools to be /software/pathogen/external/apps/usr/local/samtools-1.6/samtools, which was the one in Steve's .cshrc
More info about irods
A lot of initial questions are covered in the FAQs located at
https://gitlab.internal.sanger.ac.uk/kdj/npg_doc/blob/master/irods_in_10_minutes.adoc
http://mediawiki.internal.sanger.ac.uk/index.php/IRODS_for_Sequencing_Users
Acknowledgements
Thanks very much to Steve Doyle for help with this.
1) Request an irods account from the service desk, as explained on the irods wiki page.
2) Make sure your ..softwarerc has irods in, so you can use irods commands.
3) (Steve told me): first move to a directory where you want to transfer the cram files, and then run the following:
(e.g. for run 27104, lane 8)
kinit
< input password > # you need to input your irods password here
icd /seq/27104
ils | grep "27104_8.*cram"$ | grep -v "phix" | while read -r list; do iget /seq/27104/$list . ; done &
# once you cram files have downloaded, convert crams to fastq
bsub.py 1 cram2fq ~sd21/bash_scripts/run_cram2fastq
Note the script ~sd21/bash_scripts/run_cram2fastq says:
for i in *cram; do samtools view -ub --threads 4 ${i} | samtools sort -n - | samtools fastq -1 ${i%.cram}_1.fastq.gz -2 ${i%.cram}_2.fastq.gz - ; done
Note: to get this script to run for me, I had to make a copy of it and change the path for samtools to be /software/pathogen/external/apps/usr/local/samtools-1.6/samtools, which was the one in Steve's .cshrc
More info about irods
A lot of initial questions are covered in the FAQs located at
https://gitlab.internal.sanger.ac.uk/kdj/npg_doc/blob/master/irods_in_10_minutes.adoc
http://mediawiki.internal.sanger.ac.uk/index.php/IRODS_for_Sequencing_Users
Acknowledgements
Thanks very much to Steve Doyle for help with this.
Thursday, 11 October 2018
Analysing a S. mansoni gene list
To analyse a list of Schistosoma mansoni genes with a particular expression pattern, to see if they have some unusual features, here are some things you can try:
1. STITCH (protein-protein interactions) http://stitch.embl.de/
If there is no S. mansoni in the STITCH database, one could try C. elegans orthologs, and/or human orthologs (see 2 below). You could try with ortholog_one2one orthologs, and separately with ortholog_one2many orthologs; one-to-one orthologs might be a cleaner set, but adding one-to-many orthologs may give you a much larger sample, so allow you to pick up more.
2. To get C. elegans (or human) orthologs
- go to wormbase parasite https://parasite.wormbase.org/index.html
- click on biomart at top
- click species, tick genome, choose S. mansoni
- click on 'Gene', then in the 'id list' box, paste in your S. mansoni Smp id list
- This gives it your list of S. mansoni genes
- To tell it you want eg. C. elegans orthologs, click on 'output attributes' on the left (blue link)
- Click on 'orthologs', then under C. elegans orthologs choose for example gene id, gene name, protein stable id, % id, homology type
Note: STITCH might want gene id (WBGene) or the protein id (e.g. AC5.3)
- click on 'Count' at top of page to get id of number of results, then 'Results' at top of page to get Results. Save as tab separated file
3. Another thing to try is tissue/phenotype/GO enrichment using the C. elegans wormbase page, and your C. elegans orthologs: https://wormbase.org/tools/enrichment/tea/tea.cgi
Could try with ortholog_one2one orthologs, and separately with ortholog_one2many.
4. Can try GO enrichment for S. mansoni (or your C.elegans/human orthologs) using TopGO (an R package).
First you need your S. mansoni GO terms for S. mansoni genes from WormBase parasite Biomart :
- go to wormbase parasite https://parasite.wormbase.org/index.html
- click on biomart at top
- click species, tick genome, choose S. mansoni
- To tell it you want GO terms, click on 'output attributes' on the left (blue link)
- Select 'Gene ontology' and tick all the boxes beside it
- Click on "results' at top of the page
- Then run TopGO. See my notes here on TopGO: http://avrilomics.blogspot.com/2015/07/using-topgo-to-test-for-go-term.html
Note: 4-Feb-2019:
Another thing to try could be https://biit.cs.ut.ee/gprofiler/gost for GO enrichment, can take WormBase ParaSite gene lists.
Note: 3-July-2019:
Other things to try:
- find Drosophila melanogaster orthologs, paste into the FlyMine website
- find Drosophila melanogaster orthologs, and test for enrichment of phenotypes downloaded from FlyBase
- try the GSEA Gene Set Enrichment software
1. STITCH (protein-protein interactions) http://stitch.embl.de/
If there is no S. mansoni in the STITCH database, one could try C. elegans orthologs, and/or human orthologs (see 2 below). You could try with ortholog_one2one orthologs, and separately with ortholog_one2many orthologs; one-to-one orthologs might be a cleaner set, but adding one-to-many orthologs may give you a much larger sample, so allow you to pick up more.
- go to wormbase parasite https://parasite.wormbase.org/index.html
- click on biomart at top
- click species, tick genome, choose S. mansoni
- click on 'Gene', then in the 'id list' box, paste in your S. mansoni Smp id list
- This gives it your list of S. mansoni genes
- To tell it you want eg. C. elegans orthologs, click on 'output attributes' on the left (blue link)
- Click on 'orthologs', then under C. elegans orthologs choose for example gene id, gene name, protein stable id, % id, homology type
Note: STITCH might want gene id (WBGene) or the protein id (e.g. AC5.3)
- click on 'Count' at top of page to get id of number of results, then 'Results' at top of page to get Results. Save as tab separated file
3. Another thing to try is tissue/phenotype/GO enrichment using the C. elegans wormbase page, and your C. elegans orthologs: https://wormbase.org/tools/enrichment/tea/tea.cgi
Could try with ortholog_one2one orthologs, and separately with ortholog_one2many.
4. Can try GO enrichment for S. mansoni (or your C.elegans/human orthologs) using TopGO (an R package).
First you need your S. mansoni GO terms for S. mansoni genes from WormBase parasite Biomart :
- go to wormbase parasite https://parasite.wormbase.org/index.html
- click on biomart at top
- click species, tick genome, choose S. mansoni
- To tell it you want GO terms, click on 'output attributes' on the left (blue link)
- Select 'Gene ontology' and tick all the boxes beside it
- Click on "results' at top of the page
- Then run TopGO. See my notes here on TopGO: http://avrilomics.blogspot.com/2015/07/using-topgo-to-test-for-go-term.html
Note: 4-Feb-2019:
Another thing to try could be https://biit.cs.ut.ee/gprofiler/gost for GO enrichment, can take WormBase ParaSite gene lists.
Note: 3-July-2019:
Other things to try:
- find Drosophila melanogaster orthologs, paste into the FlyMine website
- find Drosophila melanogaster orthologs, and test for enrichment of phenotypes downloaded from FlyBase
- try the GSEA Gene Set Enrichment software
Tuesday, 25 September 2018
How to do a substructure search of ChEMBL (2)
I previously wrote some notes on how to do a substructure search of ChEMBL.
I've been doing some more and found some funny/interesting things.
1) Strange things with aromatic rings!
I wanted to do a search that would hit both menadione (a napthaquinone, image from wikipedia):

and also hit anthraquinones like diacerein (image from wikipedia):

I first tried this with this substructure but it only hit menadione and not the anthraquinones:

Then after discussing with Noel (thanks Noel!) I found out that I need to specify S/A (single/aromatic) and D/A (double/aromatic) bonds, like this:

This found both the anthraquinones and naphthaquinones, hurray!
Note: I found that the ability to specify S/A and D/A bonds is only available in the current ChEMBL website, not the new ChEMBL beta website, which seems to use a different sketcher from ChemAxon.
Note 2 (1-Oct-2018): I heard back from the ChEMBL website that you can specify S/A bond on the ChEMBL beta website by selecting the bond and pressing 14, and D/A by pressing 24 (and 'any' bond by pressing 0). Thanks to David Mendez from ChEMBL!
2) Specifying any atom with 'A'
I wanted to do a search which would pick up both

and

I found I could do this with the 'A' (any atom), like this:

Note: on the ChEMBL beta website, I see '*', but if I select this and press 'A' it turns to A.
3) Wierd things I can't explain
I found that when I do this attached substructure search
it gets a hit to dipananone https://www.ebi.ac.uk/ chembldb/index.php/compound/ inspect/CHEMBL2111157
when I do the search using the ChEBML beta interface, but not when I do
the exact same substructure search using the normal CHEMBL interface. I'm not sure why this is? I sent an email to the ChEMBL helpdesk, waiting for a reply...
4) Starting from a particular structure
If you have a problem drawing in your structure, you can save a related compound as its mol file from the ChEMBL website, and then click on the 'open file' button within the sketcher on the ChEMBL homepage, and open that mol file to be your starting point for editing.
Acknowledgements
Thanks to Noel O'Blog and John Mayfield for help!
And also a big thanks to David Mendez from ChEMBL!
I've been doing some more and found some funny/interesting things.
1) Strange things with aromatic rings!
I wanted to do a search that would hit both menadione (a napthaquinone, image from wikipedia):
and also hit anthraquinones like diacerein (image from wikipedia):
I first tried this with this substructure but it only hit menadione and not the anthraquinones:
Then after discussing with Noel (thanks Noel!) I found out that I need to specify S/A (single/aromatic) and D/A (double/aromatic) bonds, like this:
This found both the anthraquinones and naphthaquinones, hurray!
Note: I found that the ability to specify S/A and D/A bonds is only available in the current ChEMBL website, not the new ChEMBL beta website, which seems to use a different sketcher from ChemAxon.
Note 2 (1-Oct-2018): I heard back from the ChEMBL website that you can specify S/A bond on the ChEMBL beta website by selecting the bond and pressing 14, and D/A by pressing 24 (and 'any' bond by pressing 0). Thanks to David Mendez from ChEMBL!
2) Specifying any atom with 'A'
I wanted to do a search which would pick up both
and
I found I could do this with the 'A' (any atom), like this:
Note: on the ChEMBL beta website, I see '*', but if I select this and press 'A' it turns to A.
3) Wierd things I can't explain
I found that when I do this attached substructure search
it gets a hit to dipananone https://www.ebi.ac.uk/
4) Starting from a particular structure
If you have a problem drawing in your structure, you can save a related compound as its mol file from the ChEMBL website, and then click on the 'open file' button within the sketcher on the ChEMBL homepage, and open that mol file to be your starting point for editing.
Acknowledgements
Thanks to Noel O'Blog and John Mayfield for help!
And also a big thanks to David Mendez from ChEMBL!
Monday, 3 September 2018
CMYK versus RGB
I always forget the difference between RGB and CYMK images.
My colleague Adam Reid reminded me that RGB is best for viewing on screen, and CMYK for printing. Thanks Adam!
My colleague Adam Reid reminded me that RGB is best for viewing on screen, and CMYK for printing. Thanks Adam!
Compare documents using Word
I had two versions of some text and wanted to compare them using Word, so it would give the same annotation as if I had had 'track changes' turned on.
I tried this initially, but got a strange output from Word where it showed both versions of the text beside each other. After some fiddling, this is what worked:
(i) Paste one (the older) version of the text in one Word document. Accept all changes in the document. Save as 'oldversion'.
(ii) Paste the second (the newer) version of the text in a second Word document. Accept all changes in the document. Save as 'newversion'.
(iii) Quit Word and just one the one that is the 'newversion'.
(iv) Go to Tools -> Compare docs, and click on the down-arrow symbol to show all options, and select to show the changes in the newversion document.
I tried this initially, but got a strange output from Word where it showed both versions of the text beside each other. After some fiddling, this is what worked:
(i) Paste one (the older) version of the text in one Word document. Accept all changes in the document. Save as 'oldversion'.
(ii) Paste the second (the newer) version of the text in a second Word document. Accept all changes in the document. Save as 'newversion'.
(iii) Quit Word and just one the one that is the 'newversion'.
(iv) Go to Tools -> Compare docs, and click on the down-arrow symbol to show all options, and select to show the changes in the newversion document.
Formatting references using EndNote
I need to format references in a paper, which has a main text Word document, and a supplementary Word document.
To ensure that EndNote starts the reference list in the supplementary Word document after the last number in the main text (e.g. if numbers 1-53 are in the main text, and 54 onwards in the supplementary) I did the following: (this is to remind me for the future!)
(i) Turn off 'track changes' in the supplementary doc, and paste in the introduction+results+discussion+methods from the main text document at the top of the supplementary document.
(ii) Format the bibliography in the supplementary document using EndNote, and save a copy of the merged document that contains the EndNote field codes. This converts the EndNote reference numbers to plain text, so EndNote no longer recognises them as references.
(iii) Then select 'remove field codes' in EndNote to remove the EndNote field codes from the merged document, and save a copy of the merged document without the EndNote field codes.
(iv) In the main text document, turn off 'track changes', and paste back in the Introduction+Results+Discussion+Methods with the formatted references, from the merged document without the EndNote field codes. Then paste in the reference list from the merged document without the EndNote field codes.
Note: By turning off 'track changes' in the supplementary and main text files for this part, you ensure that the copy and paste of the large chunk of text isn't just tracked as one huge insertion, so earlier small edits you made using 'track changes' turned on should still be recorded.
Note 2: Remember if you submit the version of the main text without the EndNote field codes, and the journal then asks you to make some changes, you will need to go back to editing the version of the merged document that still has EndNote field codes (not the version of the main text that you submitted, that lacks EndNote field codes). (Learnt the hard way : )
To ensure that EndNote starts the reference list in the supplementary Word document after the last number in the main text (e.g. if numbers 1-53 are in the main text, and 54 onwards in the supplementary) I did the following: (this is to remind me for the future!)
(i) Turn off 'track changes' in the supplementary doc, and paste in the introduction+results+discussion+methods from the main text document at the top of the supplementary document.
(ii) Format the bibliography in the supplementary document using EndNote, and save a copy of the merged document that contains the EndNote field codes. This converts the EndNote reference numbers to plain text, so EndNote no longer recognises them as references.
(iii) Then select 'remove field codes' in EndNote to remove the EndNote field codes from the merged document, and save a copy of the merged document without the EndNote field codes.
(iv) In the main text document, turn off 'track changes', and paste back in the Introduction+Results+Discussion+Methods with the formatted references, from the merged document without the EndNote field codes. Then paste in the reference list from the merged document without the EndNote field codes.
Note: By turning off 'track changes' in the supplementary and main text files for this part, you ensure that the copy and paste of the large chunk of text isn't just tracked as one huge insertion, so earlier small edits you made using 'track changes' turned on should still be recorded.
Note 2: Remember if you submit the version of the main text without the EndNote field codes, and the journal then asks you to make some changes, you will need to go back to editing the version of the merged document that still has EndNote field codes (not the version of the main text that you submitted, that lacks EndNote field codes). (Learnt the hard way : )
Subscribe to:
Posts (Atom)
