Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Improved SRA tests, corrected error message #638
Conversation
coveralls
commented
Jun 8, 2016
yfarjoun
commented on the diff
Jun 10, 2016
| @@ -61,7 +61,8 @@ public SRAFileReader(final SRAAccession acc) { | ||
| this.acc = acc; | ||
| if (!acc.isValid()) { | ||
| - throw new IllegalArgumentException("Invalid SRA accession was passed to SRA reader: " + acc); | ||
| + throw new IllegalArgumentException("SRAFileReader: cannot resolve SRA accession '" + acc + "'\n" + |
yfarjoun
Contributor
|
yfarjoun
commented on the diff
Jun 10, 2016
| @@ -46,7 +46,7 @@ | ||
| * Created by andrii.nikitiuk on 10/28/15. | ||
| */ | ||
| public class SRAIndexTest extends AbstractSRATest { | ||
| - private static final SRAAccession DEFAULT_ACCESSION = new SRAAccession("SRR1298981"); | ||
| + private static final SRAAccession DEFAULT_ACCESSION = new SRAAccession("SRR2096940"); |
yfarjoun
Contributor
|
|
@a-nikitiuk back to you. only one comment really: can you not distinguish between a bad connection and a bad accesssion string? It seems that some part of the code must know, so perhaps you can give an return code to isValid() that will be more than a boolean and work with that. The problem is that if the accession becomes "bad" because of code change we will never find out because we will skip the test. |
|
Unfortunately, it is not possible in current version of NGS API. We are working on improvement, but that is not an easy and quick fix. |
yfarjoun
was assigned
by droazen
Jun 10, 2016
|
In that case @a-nikitiuk I think it would be better to test connectivity with a single |
|
@a-nikitiuk This needs to be rebased, and also did you have time to think about my suggestion of using |
yfarjoun
added the
Review-party candidate
label
Jul 8, 2016
|
@a-nikitiuk will you have time to rebase and replace We would love to have these changes.... |
|
Yeah, will do that. Sorry, did not have much time lately |
|
Rebased and added |
coveralls
commented
Jul 13, 2016
yfarjoun
commented on the diff
Jul 14, 2016
| if(!SRAAccession.isSupported()){ | ||
| throw new SkipException("Skipping SRA Test because SRA native code is unavailable."); | ||
| } | ||
| } | ||
| + @BeforeMethod | ||
| + public final void skipIfCantResolve(Method method, Object[] params) { | ||
| + String accession = null; | ||
| + | ||
| + if (params.length > 0) { | ||
| + Object firstParam = params[0]; | ||
| + if (firstParam instanceof String) { | ||
| + accession = (String)firstParam; | ||
| + } else if (firstParam instanceof SRAAccession) { | ||
| + accession = firstParam.toString(); | ||
| + } | ||
| + } | ||
| + | ||
| + if (accession != null && | ||
| + accession.matches(SRAAccession.REMOTE_ACCESSION_PATTERN) && !canResolveNetworkAccession) { |
yfarjoun
Contributor
|
|
@a-nikitiuk are you planing to make these changes, or should I do them? |
|
You can do them if you would like to. Or I will try to find time for that today-tomorrow |
|
OK. I'll leave it to you then! thanks! On Tue, Jul 26, 2016 at 2:20 PM, a-nikitiuk notifications@github.com
|
|
Done |
coveralls
commented
Jul 28, 2016
|
thanks! |
yfarjoun
merged commit 0875b62
into
samtools:master
Jul 29, 2016
This was referenced Aug 23, 2016
jamesemery
added a commit
to jamesemery/htsjdk
that referenced
this pull request
Sep 1, 2016
|
|
a-nikitiuk + jamesemery |
14d939d
|
a-nikitiuk commentedJun 7, 2016
•
edited
Description
These changes are intended to resolve most of previously reported SRA-related issues:
Checklist