This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: https://www.netroby.com/view/3891 | |
yum groupinstall "Development Tools" | |
yum install ncurses-devel git-core | |
git clone [email protected]:vim/vim.git | |
./configure --prefix=/usr --with-features=huge --enable-multibyte --with-python-config-dir=/usr/lib/python2.7/config --enable-pythoninterp=yes | |
make -j4 | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import napari | |
import mrcfile | |
import numpy as np | |
from pathlib import Path | |
from magicgui import magicgui | |
from napari.types import LabelsData, PointsData, ImageData | |
from scipy.ndimage import distance_transform_edt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import starfile | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
import numpy as np | |
# Read the data | |
warp_apo_df = starfile.read("warp_apo/apoferritin_fsc.star") | |
pyco_apo_df = starfile.read("pyco_apo/apoferritin_fsc.star") | |
# Create the plot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import glob | |
import pandas as pd | |
import starfile | |
# Function to read CSV files | |
def read_csv_files(directory): | |
all_data = [] | |
for filename in glob.glob(os.path.join(directory, '*.csv')): | |
df = pd.read_csv(filename, header=None, names=['X', 'Y', 'Z']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import starfile | |
import typer | |
from pathlib import Path | |
import subprocess | |
import os | |
star2mod = typer.Typer(add_completion=False) | |
@star2mod.command(no_args_is_help=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import typer | |
import logging | |
from pathlib import Path | |
import imodmodel | |
import numpy as np | |
import matplotlib.path as mplPath | |
import mrcfile | |
from scipy.interpolate import interp1d | |
app = typer.Typer(add_completion=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import starfile | |
import pandas as pd | |
df_optics = pd.DataFrame({ | |
'rlnOpticsGroup': [1], | |
"rlnOpticsGroupName": ["OpticsGroup1"], | |
'rlnSphericalAberration': [2.7], | |
'rlnVoltage': [300], | |
'rlnImagePixelSize': [5], | |
'rlnImageDimensionality': [3] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import mdocfile | |
import shutil | |
import typer | |
import logging | |
from typing import Optional | |
# Configure logging | |
logging.basicConfig( | |
level=logging.INFO, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import starfile | |
XDIM = 378 | |
YDIM = 378 | |
ZDIM = 228 | |
df = starfile.read("gs07_ts_003_8.00Apx_emd_13474_clean.star") | |
xyz_headings = [f'rlnCoordinate{axis}' for axis in 'XYZ'] | |
xyz_headings.append('rlnAutopickFigureOfMerit') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
import imodmodel | |
import starfile | |
import pandas as pd | |
import numpy as np | |
# Create optics dataframe | |
df_optics = pd.DataFrame({ | |
'rlnOpticsGroup': [1], | |
'rlnOpticsGroupName': ["OpticsGroup1"], |