[med-svn] [Git][med-team/ncbi-entrez-direct][upstream] New upstream version 14.6.20210224+dfsg

Aaron M. Ucko gitlab at salsa.debian.org
Thu Feb 25 02:16:55 GMT 2021



Aaron M. Ucko pushed to branch upstream at Debian Med / ncbi-entrez-direct


Commits:
509e0c27 by Aaron M. Ucko at 2021-02-24T21:04:50-05:00
New upstream version 14.6.20210224+dfsg
- - - - -


4 changed files:

- ecommon.sh
- efetch
- esample
- transmute.go


Changes:

=====================================
ecommon.sh
=====================================
@@ -975,6 +975,14 @@ LookupSpecialAccessions() {
           ids=$( echo "$rem $lcl" | fmt -w 1 | sort -n | uniq )
         fi
         ;;
+      taxonomy )
+        acc=$( ExtractAccns )
+        if [ -n "$acc" ]
+        then
+          echo "ERROR: Taxonomy database does not index sequence accession numbers" >&2
+          exit 1
+        fi
+        ;;
     esac
     if [ -n "$fld" ]
     then


=====================================
efetch
=====================================
@@ -1004,6 +1004,7 @@ case "$format:$dbase:$mode:$isSequence" in
   docsum:gtr:json:* ) chunk=50    ;;
   docsum:*:json:*   ) chunk=500   ;;
   bioc:*            ) chunk=100   ;;
+  ipg:*             ) chunk=1     ;;
   json:snp:*        ) chunk=10    ;;
   *:*:true          ) chunk=100   ;;
   *                 ) chunk=1000  ;;


=====================================
esample
=====================================
@@ -1649,6 +1649,8 @@ EOF
 do_gencode() {
   cat <<EOF
 
+Standard Genetic Code Table
+
                            Second Position
   First      T             C             A             G      Third
   -----------------------------------------------------------------
@@ -1673,6 +1675,8 @@ do_gencode() {
         GTG Val [V]   GCG Ala [A]   GAG Glu [E]   GGG Gly [G]   G
   -----------------------------------------------------------------
 
+Amino Acid Abbreviations
+
   Alanine          Ala   A                  |   A   Ala   Alanine
   Arginine         Arg   R   R-ginine       |   B   Asx   Asp or Asn
   Asparagine       Asn   N   asparagiNe     |   C   Cys   Cysteine
@@ -1703,6 +1707,8 @@ do_gencode() {
 
   -----------------------------------------------------------------
 
+Nucleotide Abbreviations
+
             R   AG   puRine       |   H   ACT    not G
             Y   CT   pYrimidine   |   B   CGT    not A
             M   AC   aMino        |   V   ACG    not T
@@ -1710,6 +1716,37 @@ do_gencode() {
             S   CG   Strong       |   N   ACGT   unkNown
             W   AT   Weak         |   X   ACGT   unknown
 
+Genetic Code Names
+
+  1:     Standard
+  2:     Vertebrate Mitochondrial
+  3:     Yeast Mitochondrial
+  4:     Mold Mitochondrial; Protozoan Mitochondrial;
+         Coelenterate Mitochondrial; Mycoplasma; Spiroplasma
+  5:     Invertebrate Mitochondrial
+  6:     Ciliate Nuclear; Dasycladacean Nuclear; Hexamita Nuclear
+  9:     Echinoderm Mitochondrial; Flatworm Mitochondrial
+  10:    Euplotid Nuclear
+  11:    Bacterial, Archaeal and Plant Plastid
+  12:    Alternative Yeast Nuclear
+  13:    Ascidian Mitochondrial
+  14:    Alternative Flatworm Mitochondrial
+  15:    Blepharisma Macronuclear
+  16:    Chlorophycean Mitochondrial
+  21:    Trematode Mitochondrial
+  22:    Scenedesmus obliquus Mitochondrial
+  23:    Thraustochytrium Mitochondrial
+  24:    Rhabdopleuridae Mitochondrial
+  25:    Candidate Division SR1 and Gracilibacteria
+  26:    Pachysolen tannophilus Nuclear
+  27:    Karyorelict Nuclear
+  28:    Condylostoma Nuclear
+  29:    Mesodinium Nuclear
+  30:    Peritrich Nuclear
+  31:    Blastocrithidia Nuclear
+  32:    Balanophoraceae Plastid
+  33:    Cephalodiscidae Mitochondrial
+
 EOF
 }
 


=====================================
transmute.go
=====================================
@@ -4589,35 +4589,30 @@ func ReadAllIntoSequence(inp io.Reader) string {
 		return ""
 	}
 
-	var buffer strings.Builder
-
-	scanr := bufio.NewScanner(inp)
-
-	for scanr.Scan() {
-
-		str := scanr.Text()
+	data, _ := ioutil.ReadAll(inp)
+	txt := string(data)
 
-		// skip FASTA definition line
-		if strings.HasPrefix(str, ">") {
-			continue
+	// skip past FASTA definition line
+	if len(txt) > 0 && txt[0] == '>' {
+		pos := strings.Index(txt, "\n")
+		if pos > 0 {
+			txt = txt[:pos+1]
 		}
-		// convert everything to upper case
-		str = strings.ToUpper(str)
-
-		// leave only upper case letters or asterisk
-		str = strings.Map(func(c rune) rune {
-			if (c < 'A' || c > 'Z') && c != '*' && c != '-' {
-				return -1
-			}
-			return c
-		}, str)
+	}
 
-		buffer.WriteString(str)
+	if txt == "" {
+		return ""
 	}
 
-	txt := buffer.String()
+	// convert letters to upper case, leave only upper case letters, asterisk, or hyphen
+	str := strings.Map(func(c rune) rune {
+		if (c < 'A' || c > 'Z') && c != '*' && c != '-' {
+			return -1
+		}
+		return c
+	}, strings.ToUpper(txt))
 
-	return txt
+	return str
 }
 
 func ReadFromFileIntoSequence(fname string) string {



View it on GitLab: https://salsa.debian.org/med-team/ncbi-entrez-direct/-/commit/509e0c274178abf9d5c16abde65bf7b08d9352cd

-- 
View it on GitLab: https://salsa.debian.org/med-team/ncbi-entrez-direct/-/commit/509e0c274178abf9d5c16abde65bf7b08d9352cd
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210225/c5d07057/attachment-0001.htm>


More information about the debian-med-commit mailing list