diff --git a/mrdna/readers/test.ipynb b/mrdna/readers/test.ipynb index 207998d94578efcb8916ef58fcb29016ab1e6bd4..a3bd160b751ec4f98fab99afeb23a4076371dfd4 100644 --- a/mrdna/readers/test.ipynb +++ b/mrdna/readers/test.ipynb @@ -2,12 +2,20 @@ "cells": [ { "cell_type": "code", - "execution_count": 9, + "execution_count": 1, "id": "03eb8540", "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "pip3 install termcolor\n" + ] + } + ], "source": [ "import pandas as pd\n", "import pickle\n", @@ -55,8 +63,8 @@ }, { "cell_type": "code", - "execution_count": 6, - "id": "4fc535bb", + "execution_count": 15, + "id": "3a134bd9-0d8c-40b2-bf71-7b2310e09802", "metadata": {}, "outputs": [], "source": [ @@ -71,11 +79,13 @@ " elif _gt == 2:\n", " lattice_type = 'honeycomb'\n", " else:\n", - " print(\"WARNING: unable to determine cadnano part lattice type\")\n", + " print(lattice_type)\n", " return lattice_type\n", "\n", "\n", "def read_json_file(filename):\n", + " import cadnano\n", + " from cadnano.document import Document\n", "\n", " try:\n", " with open(filename) as ch:\n", @@ -113,9 +123,10 @@ " for id_num in part.getIdNums():\n", " if part.vh_properties.loc[id_num,'eulerZ'] == 0:\n", " part.vh_properties.loc[id_num,'eulerZ'] = 360*(6/10.5)\n", - " df=pd.DataFrame(json_data[\"vstrands\"])\n", - " n_df=df.set_index(\"num\")\n", - " return part,n_df\n", + " df=pd.DataFrame(json_data[\"vstrands\"])\n", + " n_df=df.set_index(\"num\")\n", + " return part\n", + "\n", "def get_helix_angle(part, helix_id, indices):\n", " \"\"\" Get \"start_orientation\" for helix \"\"\"\n", " # import ipdb\n", @@ -139,136 +150,411 @@ " twist_per_base = tpr*360./bpr\n", " # angle = eulerZ - twist_per_base*indices + 0.5*mgroove + 180\n", " angle = eulerZ + twist_per_base*indices - 0.5*mgroove\n", - " return rotationAboutAxis(np.array((0,0,1)),angle)\n", + " return angle\n", "\n", - "def nttype(scafs):\n", - " def judge(i):\n", - " if i ==[-1,-1,-1,-1]:\n", - " return 0\n", - " else: return 1\n", - " n=np.array([judge(i) for i in scafs])\n", - " return n\n" + "def gen_id_series(strand,part):\n", + " df=pd.DataFrame(columns=[\"vh\",\"zid\",\"fwd\",\"stack_tuple\",\"threeprime_tuple\",\"x\",\"y\",\"z\"],index=range(strand.totalLength()),dtype=object)\n", + " df[\"vh\"]=strand._id_num\n", + " df[\"fwd\"]=strand.isForward()\n", + " df[\"x\"]=part.getVirtualHelixOrigin(strand._id_num)[0]*10\n", + " df[\"y\"]=part.getVirtualHelixOrigin(strand._id_num)[1]*10\n", + " id_lo,id_hi=strand.idxs()\n", + " zids=[str(i) for i in range(id_lo,id_hi+1)]\n", + " insert_dict={}\n", + " insert_dict=dict([(j.idx(),j.length()) for j in strand.insertionsOnStrand()])\n", + " z=np.arange(id_lo,id_hi+1)\n", + " zids=[str(i) for i in range(id_lo,id_hi+1)]\n", + " z=list(np.arange(id_lo,id_hi+1))\n", + " zids=[str(i) for i in range(id_lo,id_hi+1)]\n", + " for insert_base in insert_dict:\n", + " z_ind=zids.index(str(insert_base))\n", + " z_val=insert_dict[insert_base]\n", + " z_pos_ind=z.index(insert_base)\n", + " zids.pop(z_ind)\n", + " z.pop(z_pos_ind)\n", + " if z_val!=-1:\n", + " #l=[str(insert_base)+\".\"+str(i) for i in range(z_val+1)]\n", + " l=list(range(z_val+1))\n", + " l.reverse()\n", + " for k in l: \n", + " zids.insert(z_ind,str(insert_base)+\".\"+str(k))\n", + " z.insert(z_pos_ind,insert_base+k/(z_val+1))\n", + " df[\"zid\"]=zids\n", + " df[\"z\"]=np.array(z)*3.4\n", + " \n", + " \n", + " L=[(df[\"vh\"][i],df[\"zid\"][i],df[\"fwd\"][i]) for i in df.index]\n", + " if strand.isForward()==True:\n", + " df[\"stack_tuple\"]=L[1:]+[-1]\n", + " if strand.connection3p() is None:\n", + " df[\"threeprime_tuple\"]=L[1:]+[-1]\n", + " else:\n", + " df[\"threeprime_tuple\"]=L[1:]+[(strand.connection3p().idNum(),str(strand.connection3p().idx5Prime()),strand.connection3p().isForward())]\n", + " \n", + " \n", + " else:\n", + " df[\"stack_tuple\"]=[-1]+L[0:-1]\n", + " if strand.connection3p() is None:\n", + " df[\"threeprime_tuple\"]=[-1]+L[0:-1]\n", + " else:\n", + " df[\"threeprime_tuple\"]=[(strand.connection3p().idNum(),str(strand.connection3p().idx5Prime()),strand.connection3p().isForward())]+L[0:-1]\n", + " ## cadnano 3.1 sequence assign is wrong if there is insertion or deletion. \n", + " df[\"r\"]=[np.array([df[\"x\"][i],df[\"y\"][i],df[\"z\"][i]],dtype=np.float32) for i in df.index]\n", + " \n", + " return [pd.Series(df.loc[i]) for i in df.index]\n", + "\n" ] }, { "cell_type": "code", - "execution_count": 7, - "id": "f83dff7d", + "execution_count": 18, + "id": "04c497ae", "metadata": {}, "outputs": [], "source": [ - "def gen_prop_table(json_file):\n", - " part,vslist=read_json_file(json_file)\n", - " props = part.getModelProperties().copy()\n", - " try:\n", - " if props.get('point_type') == PointType.ARBITRARY:\n", - " # TODO add code to encode Parts with ARBITRARY point configurations\n", - " raise NotImplementedError(\"Not implemented\")\n", - " except:\n", - " try:\n", - " vh_props, origins = part.helixPropertiesAndOrigins()\n", - " except:\n", - " origins = {hid:part.getVirtualHelixOrigin(hid)[:2] for hid in part.getidNums()}\n", - " scaf_id=[nttype(vslist['scaf'][i]) for i in vslist.index]\n", - " stap_id=[nttype(vslist['stap'][i]) for i in vslist.index]\n", - " cad_bps=part.getIndices(0)\n", - " vslist[\"scafnt\"]=np.sum(np.array(scaf_id),axis=1)\n", - " vslist[\"stapnt\"]=np.sum(np.array(stap_id),axis=1)\n", - " totnt=np.sum(vslist[\"scafnt\"])+np.sum(vslist[\"stapnt\"])\n", - " is_scaf=np.zeros(totnt,dtype=bool)\n", - " is_scaf[0:np.sum(vslist[\"scafnt\"])]=1\n", - " nt_prop=pd.DataFrame(index=range(totnt),columns=[\"vh\",\"zid\",\"is_scaf\",\"r\",\"bp\",\"stack\",\"threeprime\",\"seq\",\"orientation\"])\n", - " nt_prop[\"is_scaf\"]=is_scaf\n", - " tot_id=scaf_id+stap_id\n", - " vhi,zidi=np.where(np.array(scaf_id)==1)\n", - " vhj,zidj=np.where(np.array(stap_id)==1)\n", - " vhi=vslist.index[vhi]\n", - " vhj=vslist.index[vhj]\n", - " nt_prop[\"vh\"]=list(vhi)+list(vhj)\n", - " nt_prop[\"zid\"]=list(zidi)+list(zidj)\n", + "def gen_prop_table(part):\n", + " strand_set=[]\n", + " for i in part.getidNums():\n", + " fwd,rev=part.getStrandSets(i)\n", + " [strand_set.append(i) for i in fwd.strands()]\n", + " [strand_set.append(i) for i in rev.strands()]\n", + " id_series=[]\n", + " for i in strand_set:\n", + " id_series=id_series+gen_id_series(i,part)\n", + " \n", + " nt_prop=pd.DataFrame(id_series)\n", + " nt_prop.reset_index(inplace=True)\n", + " nt_prop[\"seq\"]=-1\n", + " ind_tuple=list(zip(nt_prop[\"vh\"],nt_prop[\"zid\"],nt_prop[\"fwd\"]))\n", + " stacks=[]\n", + " for i in list(nt_prop[\"stack_tuple\"]):\n", + " if i ==-1:\n", + " stacks.append(i)\n", + " else:\n", + " stacks.append(ind_tuple.index(i))\n", + " nt_prop[\"stack\"]=stacks\n", + " tprime=[]\n", + " for i in list(nt_prop[\"threeprime_tuple\"]):\n", + " if i ==-1:\n", + " tprime.append(i)\n", + " else:\n", + " tprime.append(ind_tuple.index(i))\n", + " nt_prop[\"threeprime\"]=tprime\n", " vhzid=list(zip(nt_prop[\"vh\"],nt_prop[\"zid\"]))\n", - " nt_prop[\"r\"]=[part.getCoordinate(helix_id, indices) for helix_id, indices in zip(nt_prop[\"vh\"],nt_prop[\"zid\"])]\n", - " nt_prop[\"orientation\"]=[get_helix_angle(part, helix_id, indices) for helix_id,indices in zip(nt_prop[\"vh\"],nt_prop[\"zid\"])]\n", + " nt_prop[\"orientation\"]=[get_helix_angle(part, helix_id, int(float(indices))) for helix_id,indices in vhzid]\n", " nt_prop=nt_prop.fillna(-1)\n", - " for i in range(int(len(vhzid)/2)):\n", + " counter=-1\n", + " bp=-np.ones(len(nt_prop.index),dtype=int)\n", + " bp_map=dict(zip(ind_tuple,nt_prop.index))\n", + " for i,j,k in ind_tuple:\n", + " counter+=1\n", " try:\n", - " bp1,bp2=(i,1+i+vhzid[i+1:].index(vhzid[i]))\n", - " nt_prop[\"bp\"][bp1]=bp2\n", - " nt_prop[\"bp\"][bp2]=bp1\n", + " bp[counter]=bp_map[(i,j,not(k))]\n", " except:\n", " pass\n", - " tprime_list=-np.ones(len(nt_prop.index),dtype=int)\n", - " index2=list(zip(vhzid,nt_prop[\"is_scaf\"]))\n", - " for i in range(len(nt_prop.index)):\n", - " ((m,n),p)=list(zip(vhzid,nt_prop[\"is_scaf\"]))[i]\n", - " if p==True:\n", - " k,l=(vslist[\"scaf\"][m])[n][2:]\n", - " if k!=-1 and l!=-1:\n", - " n=index2.index(((k,l),True))\n", - " tprime_list[i]=int(n)\n", - "\n", - " else:\n", - " k,l=(vslist[\"stap\"][m])[n][2:]\n", - " if k!=-1 and l!=-1:\n", - " n=index2.index(((k,l),False))\n", - " tprime_list[i]=int(n)\n", - " nt_prop[\"threeprime\"]=tprime_list\n", - " (n,)=np.where(nt_prop[\"threeprime\"]==-1)\n", - " stackid=nt_prop[\"bp\"][[list(nt_prop[\"threeprime\"]).index(i) for i in n]]\n", - " nt_prop[\"stack\"][stackid.index[np.where(np.array(stackid)!=-1)]]=nt_prop[\"threeprime\"][stackid.index[np.where(np.array(stackid)!=-1)]]\n", - " ## Todo: sequence \n", + " nt_prop[\"bp\"]=bp\n", "\n", - "\n", - " return nt_prop\n" + " return nt_prop" ] }, { "cell_type": "code", - "execution_count": 11, - "id": "1d900942", + "execution_count": 19, + "id": "11b0f5de-80f6-4845-b97f-a9d31e7be90a", "metadata": {}, "outputs": [ { - "name": "stdout", - "output_type": "stream", - "text": [ - "Found cadnano version 2 file\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "<ipython-input-7-d91c550125eb>:37: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " nt_prop[\"bp\"][bp1]=bp2\n", - "<ipython-input-7-d91c550125eb>:38: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " nt_prop[\"bp\"][bp2]=bp1\n", - "<ipython-input-7-d91c550125eb>:59: SettingWithCopyWarning: \n", - "A value is trying to be set on a copy of a slice from a DataFrame\n", - "\n", - "See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy\n", - " nt_prop[\"stack\"][stackid.index[np.where(np.array(stackid)!=-1)]]=nt_prop[\"threeprime\"][stackid.index[np.where(np.array(stackid)!=-1)]]\n" - ] + "data": { + "text/html": [ + "<div>\n", + "<style scoped>\n", + " .dataframe tbody tr th:only-of-type {\n", + " vertical-align: middle;\n", + " }\n", + "\n", + " .dataframe tbody tr th {\n", + " vertical-align: top;\n", + " }\n", + "\n", + " .dataframe thead th {\n", + " text-align: right;\n", + " }\n", + "</style>\n", + "<table border=\"1\" class=\"dataframe\">\n", + " <thead>\n", + " <tr style=\"text-align: right;\">\n", + " <th></th>\n", + " <th>index</th>\n", + " <th>vh</th>\n", + " <th>zid</th>\n", + " <th>fwd</th>\n", + " <th>stack_tuple</th>\n", + " <th>threeprime_tuple</th>\n", + " <th>x</th>\n", + " <th>y</th>\n", + " <th>z</th>\n", + " <th>r</th>\n", + " <th>seq</th>\n", + " <th>stack</th>\n", + " <th>threeprime</th>\n", + " <th>orientation</th>\n", + " <th>bp</th>\n", + " </tr>\n", + " </thead>\n", + " <tbody>\n", + " <tr>\n", + " <th>0</th>\n", + " <td>0</td>\n", + " <td>0</td>\n", + " <td>5</td>\n", + " <td>True</td>\n", + " <td>(0, 6, True)</td>\n", + " <td>(0, 6, True)</td>\n", + " <td>0.000000</td>\n", + " <td>22.50</td>\n", + " <td>17.0</td>\n", + " <td>[0.0, 22.5, 17.0]</td>\n", + " <td>-1</td>\n", + " <td>1</td>\n", + " <td>1</td>\n", + " <td>81.428571</td>\n", + " <td>38</td>\n", + " </tr>\n", + " <tr>\n", + " <th>1</th>\n", + " <td>1</td>\n", + " <td>0</td>\n", + " <td>6</td>\n", + " <td>True</td>\n", + " <td>(0, 7, True)</td>\n", + " <td>(0, 7, True)</td>\n", + " <td>0.000000</td>\n", + " <td>22.50</td>\n", + " <td>20.4</td>\n", + " <td>[0.0, 22.5, 20.4]</td>\n", + " <td>-1</td>\n", + " <td>2</td>\n", + " <td>2</td>\n", + " <td>115.714286</td>\n", + " <td>39</td>\n", + " </tr>\n", + " <tr>\n", + " <th>2</th>\n", + " <td>2</td>\n", + " <td>0</td>\n", + " <td>7</td>\n", + " <td>True</td>\n", + " <td>(0, 8, True)</td>\n", + " <td>(0, 8, True)</td>\n", + " <td>0.000000</td>\n", + " <td>22.50</td>\n", + " <td>23.8</td>\n", + " <td>[0.0, 22.5, 23.8]</td>\n", + " <td>-1</td>\n", + " <td>3</td>\n", + " <td>3</td>\n", + " <td>150.000000</td>\n", + " <td>40</td>\n", + " </tr>\n", + " <tr>\n", + " <th>3</th>\n", + " <td>3</td>\n", + " <td>0</td>\n", + " <td>8</td>\n", + " <td>True</td>\n", + " <td>(0, 9, True)</td>\n", + " <td>(0, 9, True)</td>\n", + " <td>0.000000</td>\n", + " <td>22.50</td>\n", + " <td>27.2</td>\n", + " <td>[0.0, 22.5, 27.2]</td>\n", + " <td>-1</td>\n", + " <td>4</td>\n", + " <td>4</td>\n", + " <td>184.285714</td>\n", + " <td>41</td>\n", + " </tr>\n", + " <tr>\n", + " <th>4</th>\n", + " <td>4</td>\n", + " <td>0</td>\n", + " <td>9</td>\n", + " <td>True</td>\n", + " <td>(0, 10, True)</td>\n", + " <td>(0, 10, True)</td>\n", + " <td>0.000000</td>\n", + " <td>22.50</td>\n", + " <td>30.6</td>\n", + " <td>[0.0, 22.5, 30.6]</td>\n", + " <td>-1</td>\n", + " <td>5</td>\n", + " <td>5</td>\n", + " <td>218.571429</td>\n", + " <td>42</td>\n", + " </tr>\n", + " <tr>\n", + " <th>...</th>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " <td>...</td>\n", + " </tr>\n", + " <tr>\n", + " <th>410</th>\n", + " <td>12</td>\n", + " <td>5</td>\n", + " <td>35</td>\n", + " <td>False</td>\n", + " <td>(5, 34, False)</td>\n", + " <td>(5, 34, False)</td>\n", + " <td>19.485574</td>\n", + " <td>11.25</td>\n", + " <td>119.0</td>\n", + " <td>[19.485573, 11.25, 119.0]</td>\n", + " <td>-1</td>\n", + " <td>409</td>\n", + " <td>409</td>\n", + " <td>1110.000000</td>\n", + " <td>375</td>\n", + " </tr>\n", + " <tr>\n", + " <th>411</th>\n", + " <td>13</td>\n", + " <td>5</td>\n", + " <td>36</td>\n", + " <td>False</td>\n", + " <td>(5, 35, False)</td>\n", + " <td>(5, 35, False)</td>\n", + " <td>19.485574</td>\n", + " <td>11.25</td>\n", + " <td>122.4</td>\n", + " <td>[19.485573, 11.25, 122.4]</td>\n", + " <td>-1</td>\n", + " <td>410</td>\n", + " <td>410</td>\n", + " <td>1144.285714</td>\n", + " <td>376</td>\n", + " </tr>\n", + " <tr>\n", + " <th>412</th>\n", + " <td>14</td>\n", + " <td>5</td>\n", + " <td>37</td>\n", + " <td>False</td>\n", + " <td>(5, 36, False)</td>\n", + " <td>(5, 36, False)</td>\n", + " <td>19.485574</td>\n", + " <td>11.25</td>\n", + " <td>125.8</td>\n", + " <td>[19.485573, 11.25, 125.8]</td>\n", + " <td>-1</td>\n", + " <td>411</td>\n", + " <td>411</td>\n", + " <td>1178.571429</td>\n", + " <td>377</td>\n", + " </tr>\n", + " <tr>\n", + " <th>413</th>\n", + " <td>15</td>\n", + " <td>5</td>\n", + " <td>38</td>\n", + " <td>False</td>\n", + " <td>(5, 37, False)</td>\n", + " <td>(5, 37, False)</td>\n", + " <td>19.485574</td>\n", + " <td>11.25</td>\n", + " <td>129.2</td>\n", + " <td>[19.485573, 11.25, 129.2]</td>\n", + " <td>-1</td>\n", + " <td>412</td>\n", + " <td>412</td>\n", + " <td>1212.857143</td>\n", + " <td>378</td>\n", + " </tr>\n", + " <tr>\n", + " <th>414</th>\n", + " <td>16</td>\n", + " <td>5</td>\n", + " <td>39</td>\n", + " <td>False</td>\n", + " <td>(5, 38, False)</td>\n", + " <td>(5, 38, False)</td>\n", + " <td>19.485574</td>\n", + " <td>11.25</td>\n", + " <td>132.6</td>\n", + " <td>[19.485573, 11.25, 132.6]</td>\n", + " <td>-1</td>\n", + " <td>413</td>\n", + " <td>413</td>\n", + " <td>1247.142857</td>\n", + " <td>379</td>\n", + " </tr>\n", + " </tbody>\n", + "</table>\n", + "<p>415 rows × 15 columns</p>\n", + "</div>" + ], + "text/plain": [ + " index vh zid fwd stack_tuple threeprime_tuple x y \\\n", + "0 0 0 5 True (0, 6, True) (0, 6, True) 0.000000 22.50 \n", + "1 1 0 6 True (0, 7, True) (0, 7, True) 0.000000 22.50 \n", + "2 2 0 7 True (0, 8, True) (0, 8, True) 0.000000 22.50 \n", + "3 3 0 8 True (0, 9, True) (0, 9, True) 0.000000 22.50 \n", + "4 4 0 9 True (0, 10, True) (0, 10, True) 0.000000 22.50 \n", + ".. ... .. .. ... ... ... ... ... \n", + "410 12 5 35 False (5, 34, False) (5, 34, False) 19.485574 11.25 \n", + "411 13 5 36 False (5, 35, False) (5, 35, False) 19.485574 11.25 \n", + "412 14 5 37 False (5, 36, False) (5, 36, False) 19.485574 11.25 \n", + "413 15 5 38 False (5, 37, False) (5, 37, False) 19.485574 11.25 \n", + "414 16 5 39 False (5, 38, False) (5, 38, False) 19.485574 11.25 \n", + "\n", + " z r seq stack threeprime orientation \\\n", + "0 17.0 [0.0, 22.5, 17.0] -1 1 1 81.428571 \n", + "1 20.4 [0.0, 22.5, 20.4] -1 2 2 115.714286 \n", + "2 23.8 [0.0, 22.5, 23.8] -1 3 3 150.000000 \n", + "3 27.2 [0.0, 22.5, 27.2] -1 4 4 184.285714 \n", + "4 30.6 [0.0, 22.5, 30.6] -1 5 5 218.571429 \n", + ".. ... ... ... ... ... ... \n", + "410 119.0 [19.485573, 11.25, 119.0] -1 409 409 1110.000000 \n", + "411 122.4 [19.485573, 11.25, 122.4] -1 410 410 1144.285714 \n", + "412 125.8 [19.485573, 11.25, 125.8] -1 411 411 1178.571429 \n", + "413 129.2 [19.485573, 11.25, 129.2] -1 412 412 1212.857143 \n", + "414 132.6 [19.485573, 11.25, 132.6] -1 413 413 1247.142857 \n", + "\n", + " bp \n", + "0 38 \n", + "1 39 \n", + "2 40 \n", + "3 41 \n", + "4 42 \n", + ".. ... \n", + "410 375 \n", + "411 376 \n", + "412 377 \n", + "413 378 \n", + "414 379 \n", + "\n", + "[415 rows x 15 columns]" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" } ], "source": [ - "nt_prop=gen_prop_table(\"test/test.json\")" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "04c497ae", - "metadata": {}, - "outputs": [], - "source": [ - "nt_prop.to_csv(\"test.csv\")" + "gen_prop_table(p)" ] }, { @@ -910,7 +1196,7 @@ }, { "cell_type": "code", - "execution_count": 358, + "execution_count": 13, "id": "2fa31a78", "metadata": {}, "outputs": [ @@ -924,16 +1210,16 @@ { "data": { "text/plain": [ - "NucleicAcidPart_-1_3904" + "NucleicAcidPart_-1_2800" ] }, - "execution_count": 358, + "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ - "p,f=read_json_file(\"test.json\")\n", + "p=read_json_file(\"test/test.json\")\n", "p" ] }, @@ -4437,7 +4723,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -4451,7 +4737,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.18" + "version": "3.8.19" } }, "nbformat": 4,