Using Synapse Client 1.4.dev1.
synapse add /ycga-ba/ba_sequencers3/scratch/gc223/data/PsychENCODE/Mapped/Sample_11_015/accepted_hits.bam --parentid syn5934231 --name 11_015.bam --used http://ccb.jhu.edu/software/tophat/downloads/tophat-2.0.13.Linux_x86_64.tar.gz http://hgdownload.cse.ucsc.edu/goldenPath/hg19/bigZips/hg19.2bit --executed /ycga-ba/ba_sequencers3/scratch/gc223/data/PsychENCODE/Mapped/script.sh --annotations '{"consortium": "PEC", "grant": "U01MH103365", "group": "Yale", "PI": "Flora vaccarino", "study": "iPSC", "disease": "Control", "organism": "Homo Sapiens", "lifeStage": "Fetal", "organ": "NA", "tissueType": "Organoids", "tissueTypeAbrv": "ORG", "CellType": "NeuN-", "treatmentType": "control", "dataType": "total", "dataSubType": "NA", "assay": "RNA-seq", "assayTarget": "NA", "libraryPrep": "rRNA depletion", "runType": "paired-end", "readLength": "75", "platform": "HiSeq2000", "fileType": "bam", "accessControl": "Embargo"}'
as a result I get then following error:
SynapseFileNotFoundError: File /ycga-ba/ba_sequencers3/scratch/gc223/data/PsychENCODE/Mapped/script.sh not found in Synapse
needless to say that the file script.sh is under the path specified.
This is a gotcha in the documentation - not quite an error, just misleading.
You can give a file path as a --used argument in synapse store. It will use Larsson's associate magic to look up the file in Synapse by its MD5. But, that implies that it has previously been stored in Synapse. If no such file exists, you get the message above.
One suggestion would be changing the docs to say something like "or a local path to a file previously stored in Synapse". Would that make the behavior clearer?
Sure, let's go with that.
For example, given these files:
...this fails as it does in the example above:
But, once the files referred to in provenance are stored in Synapse, it works:
Kristen: Can you verify that the documentation as shown at:https://github.com/Sage-Bionetworks/synapsePythonClient/blob/develop/synapseclient/__main__.py#L435
is satisfactory. If so please close this issue.
Documentation looks good.