Skip to main content

CLI utility for previewing .npy files

Project description

NPView

PyPI version supported python versions License: MIT

CLI tools for quickly viewing data in various formats (eventually). Currently only .npy and .csv/.tsv files are supported.

Installation

pip install npview

Usage

CSV

Results in a nicely-formatted and interactive view of the csv data with sidescrolling. Quit by pressing q. The number of rows and columsnare printed on exit.

csv {PATH_TO_YOUR_FILE.csv}
      1 Unnamed: 0  PDB  chain  sequence  interacting_residues                                                                                                                                   >
      2 181         181  5h9i   A         GPHMTGLAAISDALAADLAGLSFSSPVAHVYNPLLYAREPHVAYLSRFGSPPKEVLFVGMNPGPWGMAQTGVPFGEVAVVTEWLGINGTVTRPAGEHPKKRVDGFACRRSEVSGRRLWGFIRERFGTPERFFARFFVANYCPLLFLTAEGG>
      3 19          19   1jdw   A         CPVSSYNEWDPLEEVIVGRAENACVPPFTIEVKANTYEKYWPFYQKQGGHYFPKDHLKKAVAEIEEMCNILKTEGVTVRRPDPIDWSLKYKTPDFESTGLYSAMPRDILIVVGNEIIEAPMAWRSRFFEYRAYRSIIKDYFHRGAKWTTAP>
      4 91          91   2irp   A         NVELFKKFSEKVEEIIEAGRILHSRGWVPATSGNISAKVSEEYIAITASGKHKGKLTPEDILLIDYEGRPVGGGKPSAETLLHTTVYKLFPEVNAVVHTHSPNATVISIVEKKDFVELEDYELLKAFPDIHTHEVKIKIPIFPNEQNIPLL>
      5 28          28   1m8z   A         GRSRLLEDFRNNRYPNLQLREIAGHIMEFSQDQHGSRFIQLKLERATPAERQLVFNEILQAAYQLMVDVFGNYVIQKFFEFGSLEQKLALAERIRGHVLSLALQMYGCRVIQKALEFIPSDQQNEMVRELDGHVLKCVKDQNGNHVVQKCI>
      6 97          97   2jpt   A         GSELETAMETLINVFHAHSGKEGDKYKLSKKELKELLQTELSGFLDAQKDADAVDKVMKELDEDGDGEVDFQEYVVLVAALTVACNNFFWENS                                                          >
      7 125         125  3ew8   A         LVPVYIYSPEYVSMCDSLAKIPKRASMVHSLIEAYALHKQMRIVKPKVASMEEMATFHTDAYLQHLQKVSQEGEYGLGYLCPATEGIFDYAAAIGGATITAAQCLIDGMCKVAINWSGGWHHAKKDEASGFCYLNDAVLGILRLRRKFERI>
      8 152         152  3sjz   A         AWPKVQPEVNIGVVGHVDHGKTTLVQAITGIWTSKHSEETIKLGYAETNIGVCESCKKPEAYVTEPSCKSCGSDDEPKFLRRISFIDAPGHEVLMATMLSGAALMDGAILVVAANEPFPQPQTREHFVALGIIGVKNLIIVQNKVDVVSKE>
      9 161         161  4ehs   A         SAPSLEFLEKLVIRYLLEDRSLLDLAVGYIHSGVFLHKKQEFDALCQEKLDDPKLVALLLDANLPLKKGGFEKELRLLILRYFERQLKEIPKSSLPFSEKXICLKKARQAIXKLKQGELVAILE                           >
     10 115         115  3bit   A         XEELNIDFDVFKKRIELLYSKYNEFEGSPNSLLFVLGSSNAENPYQKTTILHNWLLSYEFPATLIALVPGKVIIITSSAKAKHLQKAIDLFKDPESKITLELWQRNNKEPELNKKLFDDVIALINSAGKTVGIPEKDSYQGKFXTEWNPVW>
     11 164         164  4iu4   A         KKMSIVLAPFSGGQPHSGVELGPDYLLKQGLQQDMEKLGWDTRLERVFDGKVVEARKASDNGDRIGRVKRPRLTAECTEKIYKCVRRVAEQGRFPLTIGGDHSIALGTVAGVLSVHPDAGVIWVDAHADINTMSGTVSGNLHGCPLSILLG>

Num Rows: 
11 test.csv
Num Columns: 
8
npp {PATH_TO_YOUR_FILE.npy}

NumPY

npv {PATH_TO_YOUR_FILE.npy} {THRESHOLD}

Where {THRESHOLD} is an integer specifying Total number of array elements which trigger summarization rather than full repr. Default is sys.maxsize.

npp {PATH_TO_YOUR_FILE.npy}

Will attempt to print your saved matrix & itss dimensions using prettymatrix:

(2x2)
             1   22     333 4444            

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

npview-0.0.5.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file npview-0.0.5.tar.gz.

File metadata

  • Download URL: npview-0.0.5.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.8

File hashes

Hashes for npview-0.0.5.tar.gz
Algorithm Hash digest
SHA256 49730b0bf51445f4c7e5de0b47cf14b49fa6021db59e19a04cc9a6dcab687d4c
MD5 567856558935c85ebafbfe07fea494ea
BLAKE2b-256 0a4f8ec4ac207b36509016ef9f63775d57ab700ed1d9ba536cc729223cbddab2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page